-
Notifications
You must be signed in to change notification settings - Fork 149
Development workflow with Git: Fork, Branching, Commits, and Pull Request
romani edited this page Sep 25, 2012
·
15 revisions
Author is Ruslan Dyachenko.
1. Fork a repo sevntu-checkstyle/sevntu.checkstyle.
2. Clone the sevntu.checkstyle project to your local machine (username – your Github user account name.):
$ git clone [email protected]/username/sevntu.checkstyle.git3. Configure remotes:
$ cd sevntu.checkstyle
$ git remote add upstream git://github.com/sevntu-checkstyle/sevntu.checkstyle.git4. Create a branch for new check:
$ git checkout -b my-new-check5. Develop on my-new-check branch only, but Do not merge the upstream master with your development branch!!
6. Commit changes to my-new-check branch:
$ git add .
$ git commit -m "commit message"7. Fetch upstream:
$ git fetch upstream8. Update local master:
$ git checkout master
$ git pull upstream master9. Repeat steps 5-8 till dev is complete.
10. Rebase my-new-check branch on top of the upstream master:
$ git checkout my-new-check
$ git rebase master11. In the process of the rebase, it may discover conflicts. In that case it will stop and allow you to fix the conflicts. After fixing conflicts, use git add . to update the index with those contents, and then just run:
$ git rebase --continue12. Push branch to GitHub:
$ git push origin my-new-check13. Send a Pull Request.
More detailed information you can find on Git-Workflow, Git-rebase and Rebasing.