Github: Forking and Contributing Workflow
02 Mar 2015I stick to following workflow while contributing to open-source projects on Github:
- Fork
/ </em> to abdul/ </em></li> git clone [email protected]:abdul/
.git</code></li> git remote add upstream [email protected]:
/ .git</code></li> git checkout -b
</code></li> - Fix, Add or Change things (code, documentation, etc.)
git add
</code></li> git commit -m
</code></li> - Repeat #5 , #6 & #7
git pull --rebase upstream master
- Resolve any conflicts, if required
- Squash Commits, e.g. squashing last three commits:
git rebase -i HEAD~3
git push origin
</code></li> - Go to github.com/abdul/
</li> - Create a Pull Request [Github is smart enough to detect a change in forked repo, and offer you to compare and create pull-request]
- Discuss changes in PR, and Fix things in branch as required.
</ol>