Interesting Reading on Git, GitHub - obspy/obspy GitHub Wiki
- github development workflow
- working on pull request branches opened from forks, without adding the fork as a remote (copied fromthis post):
Strictly speaking, you do not need another remote. To just download the code
use `git fetch upstream pull/1756/head:fix_arclink`. To push, you can specify
the remote url without adding it `git push [email protected]:petrr/obspy fix_arclink`.
I also like to set an `insteadOf` config like:
"""
$ git config --list | grep instead
url.git://github.com/.insteadof=github:
[email protected]:.pushinsteadof=github:
"""
so that I can do `git push github:petrr/obspy fix_arclink`.
- convert existing issue into a pull request
-
can be done using github/hub (available for Anaconda)
hub pull-request -i 1704 -b obspy:master -h obspy:trace_always_contiguous
-
or via a simple POST command, e.g. using
curl
:curl --user megies --request POST --data '{"issue": "2", "head": "megies:testbranch2", "base": "master"}' https://api.github.com/repos/obspy/obspy/pulls # in case of 2-factor authentication enabled.. curl --header "X-GitHub-OTP: 123456" --user megies --request POST --data '{"issue": 2, "head": "megies:testbranch2", "base": "master"}' https://api.github.com/repos/obspy/obspy/pulls
- issue: number of the already existing normal issue
- head: repository/branch that should be pulled in
- base: branch that the pull request should be merged into (target repository specified in the url), usually either
master
(for feature branches) orreleases
(for bug fixes)
-
- interaction with svn
- Squash commits using
git rebase
# squash the last 4 commits interactively
# Only do this on a branch no one else is using
git rebase -i HEAD~4
git push --force upstream my_feature_branch