Skip to content
jdeschenes edited this page Oct 21, 2015 · 8 revisions

If a PR can't be merged directly, say because of a conflict in the release notes, you can merge the PR via the command line.

Example: User user opened a PR to merge branch branch into master.

git checkout -b user-branch master
git pull git://github.com/user/pandas.git branch

Now rebase on to master (make sure to fetch upstream first).

git fetch upstream
git rebase -i upstream/master

and make your changes necessary for the merge, say fixing that conflict in release.rst. You'll probably need to finish the rebase with git rebase --continue.

Then

git checkout master
git merge branch
git push upstream master

It should just be a fast forward merge. Don't force push to master. Note the merge commit hash and link to it when closing the pull request with a "Merged via <commit hash>"

You'll only want to use this method for small changes like a typo in the docstring.

Clone this wiki locally