Github: Forking and Contributing Workflow

I stick to following workflow while contributing to open-source projects on Github:

  1. Fork /</em> to abdul/</em></li>
  2. git clone [email protected]:abdul/.git</code></li>
  3. git remote add upstream [email protected]:/.git</code></li>
  4. git checkout -b </code></li>
  5. Fix, Add or Change things (code, documentation, etc.)
  6. git add </code></li>
  7. git commit -m </code></li>
  8. Repeat #5 , #6 & #7
  9. git pull --rebase upstream master
  10. Resolve any conflicts, if required
  11. Squash Commits, e.g. squashing last three commits:
    • git rebase -i HEAD~3
  12. git push origin </code></li>
  13. Go to github.com/abdul/</li>
  14. Create a Pull Request [Github is smart enough to detect a change in forked repo, and offer you to compare and create pull-request]
  15. Discuss changes in PR, and Fix things in branch as required.
  16. </ol>