forked from MovingBlocks/Terasology
-
Notifications
You must be signed in to change notification settings - Fork 1
Workflow
Nick Caplinger edited this page Jul 10, 2013
·
7 revisions
This workflow is based on the free e-book "http://progit.org/book/ch5-2.html" (Chapter 5.3: Public Small Project).
Always use the develop branch as base for your development.
- Create a local fork of the main repository (simply use the Fork button on the main project page)
- Clone the newly created fork to your workstation:
git clone <URL> - Add the main repository as a remote called upstream:
git remote add upstream git@github.com:MovingBlocks/Terasology.git - Switch to the develop branch:
git checkout develop - Create a topic branch (named after the issue on GitHub) for the feature/fix you're working on:
git checkout -b <issueNumber>-<description> - Work, work... Commit... Work, work... Commit... Push... Work, work... And so on
- When you're finished, use
git rebase -ito squash your commits to a single commit - Switch to the develop branch:
git checkout develop - Fetch the current changes from the main develop branch:
git fetch upstream - Rebase your local develop branch on top of the main develop branch:
git rebase upstream/develop - Switch to your local topic branch:
git checkout <issueNumber>-<description> - Rebase your local topic branch on top of your local develop branch:
git rebase develop - Push your work:
git push origin <issueNumber>-<description> - And finally: Issue a pull request on the main repository