Skip to content

Instantly share code, notes, and snippets.

@BugBuster1701
Created October 2, 2014 12:58
Show Gist options
  • Select an option

  • Save BugBuster1701/a6a4a431cb268c29dddc to your computer and use it in GitHub Desktop.

Select an option

Save BugBuster1701/a6a4a431cb268c29dddc to your computer and use it in GitHub Desktop.
different pull requests with separate branches
To make different pull requests, you create separate branches in your repository.
It is pretty common to name them after the issue they address.
It depends on the GIT interface you use but in plain command line the usual workflow goes like this:
# clone your own fork
git clone git@github.com:rolandschuetz/core.git
# add the upstream repository to the fork.
git add remote upstream git@github.com:contao/core.git
# checkout the correct maintenance branch you want to base upon
# (ie. master, develop, hotfix/3.2.15).
git checkout upstream/hotfix/3.2.15
git checkout -b fix-slider-swipe-issue
# now hack your code and commit
git commit -m "fix issue #123456789"
# push your changes to github
git push origin fix-slider-swipe-issue
# find another issue.
git checkout upstream/hotfix/3.2.15
# create another branch
git checkout -b fix-ie-comment-bug
# now hack your code and commit
git commit -m "fix issue #99999999"
# push your changes to github
git push origin fix-ie-comment-bug
That way you now have two different branches in your fork which you can hand in as pull request and even alter separately if needed without mixing the stuff.
If you understand German, the following might be of use to you: http://de.contaowiki.org/Core_Forking_-_best_practice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment