Information Technology Reference
In-Depth Information
12-8. Reworking your pull requests
Problem
You contributed to an open-source project sending a pull request. But your contribution
was not accepted. You were asked to make some improvements. You want to add two
new commits to your pull request.
Solution
Go to your local repository in which you created the revisions that were sent as the pull
request. It is in the git-recipes/12-07 directory:
$ cd git-recipes/12-07
I assume that you sent a pull request to merge the revisions from your local numbers
branch into the master branch in original repository. To get a clear linear history you
should update your local branch with the latest revisions in remote master branch. Ex-
ecute the following commands:
$ git fetch origin
$ git rebase origin/master numbers
These commands will move your revisions on top of the origin/master branch.
Now you can add some commits to your pull request. Your current branch after rebas-
ing is numbers. Create two new revisions in it:
$ git simple-commit red green
Push it to your fork with:
$ git push -f my HEAD
Your pull request should now contain two new revisions red and green. You can
check it in the following way. Go to the original repository and follow Pull Requests
button shown in Figure 12-20 .
 
Search WWH ::




Custom Search