- For remote names use
origin
andupstream
where it applies.
Following the [Github Flow][] paradigm, in short:
- Each developer creates a fork of the repository to their own account.
- Names remotes: their own repository
origin
and the main repositoryupstream
. - Creates a new branch out of
upstream/master
or target upstream branch. - Works on the branch doing Atomic Commits.
- Pushes to origin often.
- When done performs a Pull Request to
upstream/master
or the target branch.- If an issue exists (like in most cases) then they are expected to attach the Pull Request onto that issue using [HUB][], here's how to do it.
- DO NOT Squash your commits
To keep up with the master or your target branch use rebase
:
git rebase upstream/master
When a conflict occures from rebase it will halt the operation and wait for you to resolve the conflicts. Once all conflicts are resolved use the following command sequence to resume rebasing:
git add .
git rebase --continue
- [Github Flow][]
- Rolling back changes with revert
- Gitmagic Git Complete Reference