Confirmed users
182
edits
No edit summary |
|||
Line 24: | Line 24: | ||
*'''git branch ''pullrequest''''' | *'''git branch ''pullrequest''''' | ||
This will create another branch (a working copy), called ''pullrequest'', with the code of the current branch) | This will create another branch (a working copy), called ''pullrequest'', with the code of the current branch) | ||
*'''git checkout '''''<b>pullrequest</b>'' ... for the impatient, '''git''' '''checkout -b ''pullrequest'''''<br> | *'''git checkout '''''<b>pullrequest</b>'' ... for the impatient, '''git''' '''checkout -b ''pullrequest'''''<br> | ||
Line 32: | Line 32: | ||
*'''git remote add '''''<b>requestee requestee_git_fork_url</b>'' | *'''git remote add '''''<b>requestee requestee_git_fork_url</b>'' | ||
''This command will introduce your clone of the repository with the repository you want to merge with (most of the time, this is the mozilla repository). '''''Example:'''''<b>git </b>'''remote add'''''<b>mozilla</b>'''https://github.com/mozilla/Addon-Tests.git'''''will save the Addon-Test repository under the short, and easy-to-remember name ''mozilla''.<br>'' | ''This command will introduce your clone of the repository with the repository you want to merge with (most of the time, this is the mozilla repository). '''''Example:'''''<b>git </b>'''remote add'''''<b>mozilla</b>'''https://github.com/mozilla/Addon-Tests.git'''''will save the Addon-Test repository under the short, and easy-to-remember name ''mozilla''.<br>'' | ||
*'''git fetch''' '''''requestee''''' '''&& git merge''' '''''requestee/pull_request_branch_on_their_fork''''' | *'''git fetch''' '''''requestee''''' '''&& git merge''' '''''requestee/pull_request_branch_on_their_fork''''' | ||
Get the latest data from the remote repository 'mozilla' and integrate it with your current working branch. '''''Example:''''' '''git fetch ''mozilla'' && git merge '''''<b>mozilla/master</b>'' will get all the stuff from the mozilla repository (1st step) and then merge the '''''master''''' branch of '''''mozilla''''' with the data of your branch, thus keeping it up-to-date! | Get the latest data from the remote repository 'mozilla' and integrate it with your current working branch. '''''Example:''''' '''git fetch ''mozilla'' && git merge '''''<b>mozilla/master</b>'' will get all the stuff from the mozilla repository (1st step) and then merge the '''''master''''' branch of '''''mozilla''''' with the data of your branch, thus keeping it up-to-date! | ||
*Run the tests | *Run the tests | ||
**Sometimes good looking code doesn't actually work so lets prove it works! | **Sometimes good looking code doesn't actually work so lets prove it works! | ||
**If, and only if, it passes do the next steps | **If, and only if, it passes do the next steps | ||
*'''git checkout '''''<b>master</b>'' | *'''git checkout '''''<b>master</b>'' | ||
''Switch to your ''master'' branch | ''Switch to your ''master''branch'' | ||
*'''git merge '''''<b>pullrequest master</b>'' | *'''git merge '''''<b>pullrequest master</b>'' | ||
Merge your branch (working copy)''pullrequest ''with the current master branch | Merge your branch (working copy)''pullrequest ''with the current master branch | ||
*'''git push ''origin master''''' | *'''git push ''origin master''''' | ||
Push the changed stuff in your master branch back to your origin repository at github | Push the changed stuff in your master branch back to your origin repository at github | ||
*'''git branch -d '''''<b>pullrequest</b>'' | *'''git branch -d '''''<b>pullrequest</b>'' | ||
Delete the working branch you created, as everything is now merged with your master branch | Delete the working branch you created, as everything is now merged with your master branch | ||
This will have it all stored in the remote master and you will have a clean version locally. Please **don't** use the merge button on GitHub. You **need** to verify that the merge works and that button can't do that for you! | This will have it all stored in the remote master and you will have a clean version locally. Please **don't** use the merge button on GitHub. You **need** to verify that the merge works and that button can't do that for you! |