forked from MovingBlocks/Terasology
-
Notifications
You must be signed in to change notification settings - Fork 0
Workflow
begla edited this page Sep 7, 2011
·
6 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/begla/Blockmania.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 -i
to 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