defunkt/hub — Issue #132: Support `forced` checkout of pull request.
Author: daniel-pittman
Created: 2012-01-24 22:07:10+00:00
State: open

I use `hub checkout $pull_request_url` to get at code in order to test it before merging, and hope to automate use of that in future. This works wonderfully the first time around, but has trouble if someone rewrites their branch with rebase or equivalent and then asks us to merge it again from the updated pull request.

The specific problem is that hub tries to create the target branch with `checkout -b ...`, and that fails if the target branch already exists.

I would love to support the equivalent of `git checkout -f $branch` for pull requests, so that I could forcibly end up on the current version of that pull, regardless of the branch existing or not.