Skip to content
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).

General

Always use the develop branch as base for your development.

Step by step guide

  1. Create a local fork of the main repository (simply use the Fork button on the main project page)
  2. Clone the newly created fork to your workstation: git clone <URL>
  3. Add the main repository as a remote called upstream: git remote add upstream git://github.com/begla/Blockmania.git
  4. Switch to the develop branch: git checkout develop
  5. Create a topic branch (named after the issue on GitHub) for the feature/fix you're working on: git checkout -b <issueNumber>-<description>
  6. Work, work... Commit... Work, work... Commit... Push... Work, work... And so on
  7. When you're finished, use git rebase -i to squash your commits to a single commit
  8. Switch to the develop branch: git checkout develop
  9. Fetch the current changes from the main develop branch: git fetch upstream
  10. Rebase your local develop branch on top of the main develop branch: git rebase upstream/develop
  11. Switch to your local topic branch: git checkout <issueNumber>-<description>
  12. Rebase your local topic branch on top of your local develop branch: git rebase develop
  13. Push your work: git push origin <issueNumber>-<description>
  14. And finally: Issue a pull request on the main repository
Clone this wiki locally