-
Fork Fabiens repository: http://github.com/fabpot/symfony.git
-
Clone your fork and install/update vendors (I use my personal fork for now):
git clone [email protected]:pminnieur/symfony.git symfonycd symfony && sh install_vendors.sh && sh update_vendors.shphpunit -
Integrate Fabiens repository into your local clone:
git remote add fabpot git://github.com/fabpot/symfony.gitgit config branch.master.remote fabpotgit config branch.master.merge master -
To keep your master up-to-date and synchronized with Fabiens:
git fetch fabpot && git rebase fabpot/master master -
Create a new branch for everything you want to change:
git checkout -b BRANCH_NAME fabpot/masterNOTICE: steps 5-8 are the essence for successful pull request.
-
Do your stuff, check it, commit it, remerge with master:
git statusgit commit -m "did some fancy things on a hard topic"git pull --rebase -
Push everything to your origin:
git push origin BRANCH_NAME -
On GitHub, create a pull request. From
fabpot:mastertoYOUR_NAME:BRANCH_NAME. That's it.NOTICE: If you commit and pull more into this branch, they'll automatically be added to this pull requests until it is closed. This is indeed very cool for follow up commits (like fixing a typo, or adding some more functionality), but it really sucks if you're working on another topic. Thus, create and switch branches for everything. Really everything. EVERYTHING! Otherwise Fabien cannot differentiate what you originally wanted him to pull into his master.
-
If the pull request is closed and your changes are merged into Fabiens master branch, and you're done with that specific topic, you can cleanup your branch (delete it):
git checkout mastergit pull --rebasegit branch -d BRANCH_NAMEgit push origin :BRANCH_NAME -
If you want to work on another branch (w/o deleting the others):
git checkout OTHER_BRANCH_NAME
Many kudos to the Doctrine guys, their "Contributors Workflow" really helped me to figure this out!