Information Technology Reference
In-Depth Information
$ git push -f my numbers
The flag -f is necessary if during the update phase your revisions were rebased. If
there were no new revisions in the original master branch than you can use the com-
mand without -f flag:
$ git push my numbers
Keep in mind that your local branch, as well as the branch in your fork, is con-
sidered your private work until they are accepted. This means that you can use the ar-
bitrary methods described in chapter 8 to adjust the history. You add new commits, you
can reorder commits, you can delete commits, and finally, you can squash all commits
into a single commit.
And remember, whenever you want to contribute to a project hosted on Github use
branches. Do not work in your master branch for this purpose. If you prepare your pull
request in a separate branch it will not complicate your work. When a pull request is re-
jected you will simply delete the branch. Otherwise you would need to adjust the mas-
ter branch using $ git reset --hard HEAD n to remove rejected revisions.
12-9. Accepting a pull request
Problem
You own a popular repository. Developers often contribute to your project. You want to
accept a pull request that you just received.
Solution
In this recipe you will work only in the web interface provided by Github. Go to your
organization, then select the repository 12-06 and open the list of available pull re-
quests. Next open the page with the detailed information about the pull request. You
can do this following the links shown in Figure 12-22 .
 
Search WWH ::




Custom Search