Skip to content

Instantly share code, notes, and snippets.

@jmaziarz
Created November 15, 2013 20:28
Show Gist options
  • Save jmaziarz/7491029 to your computer and use it in GitHub Desktop.
Save jmaziarz/7491029 to your computer and use it in GitHub Desktop.
Creating multiple isolated pull requests
1. Fork repo from https://github.com/someuser/somerepo.git
2. Clone forked repo
$ git clone https://github.com/your_username/somerepo.git
$ cd somerepo
3. Setup upstream to someuser's repo
$ git remote add upstream https://github.com/someuser/somerepo.git
4. Fetch upstream
$ git fetch upstream
5. Checkout upstream/master and create new feature branch
$ git checkout upstream/master
$ git checkout -b cool-feature
6. Do work and commit changes
$ vi foo.rb
$ git add -A .
$ git commit -m "Added a cool feature"
7. Push feature "cool-feature" branch to origin
$ git push -u origin cool-feature
8. Generate pull request from https://github.com/your_username/somerepo.git
9. Merge to local master (optional)
$ git checkout master
$ git merge cool-feature
$ git push
10. Repeat steps 5-8 for *each* new pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment