ellisonbg at gmail.com
Wed Jan 18 13:50:36 EST 2012
On Wed, Jan 18, 2012 at 10:45 AM, Charlie Sharpsteen
<chuck at sharpsteen.net> wrote:
> On Wed, Jan 18, 2012 at 10:41 AM, Brian Granger <ellisonbg at gmail.com> wrote:
>> On Tue, Jan 17, 2012 at 6:48 PM, MinRK <benjaminrk at gmail.com> wrote:
>> > Hello,
>> > A bad commit snuck into IPython master that had to be removed,
>> > requiring a rebase and force push. So if you have been tracking
>> > IPython master, your next update may require something more forceful
>> > than `git pull`. If your git pull fails, the two-step 'force pull'
>> > is:
>> > git fetch origin
>> > git reset origin/master --hard
>> > assuming you have the IPython repo stored as 'origin', change as
>> > appropriate.
>> > PRs issued since the bad commit (on 01/12) will need to be rebased as
>> > well. Since the HEAD of code is unchanged, this should be
>> > straightforward. Simply
>> > git rebase -i
>> > and delete all the commits that aren't yours, then force push (`git
>> > push -f` and you should be set. I just did mine (#1283), and the only
>> > erroneous commits listed were:
>> > pick 813d390 Initial work to add Wijmo based menu.
>> > pick e075f09 Removing old directory.
>> > (The troublesome commit and its fix, which were squashed together)
>> > I removed these, pushed my rebased branch, and now my PR looks clean as
>> > can be.
>> > PRs that need a rebase:
>> > https://github.com/ipython/ipython/pull/1284 (Paul Ivanov)
>> > https://github.com/ipython/ipython/pull/1278 (hhuuggoo)
>> > https://github.com/ipython/ipython/pull/1264 (Brian)
>> > https://github.com/ipython/ipython/pull/1261 (Brian - apparently
>> > already merged, but no merge commit?)
>> What did I do wrong when I merged this? I rebased in on master and then
>> git co master
>> git merge branchname
>> git push upstream master
> If you rebased the branch on master, it is possible that the merge was a
> "fast-forward", i.e. a merge commit was not needed since the history merged
> in from the branch could be brought in as a set of patches that applied
> cleanly on top of master without the need for conflict resolution.
> To force a merge commit, use `git merge --no-ff branchname`.
Ahh, yes, I imagine this is exactly what happened. Thanks for the
clarification - my git-fu is definitely out of shape right now...
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com
More information about the IPython-dev