Re: [PATCH] Make rebase smarter
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 26, 2007, 09:57 UTC
- Message-ID
- <Pine.LNX.4.64.0710261054300.4362@racer.site>
- In-Reply-To
- <1193373682-3608-1-git-send-email-stevenrwalter@gmail.com>
Hi,
On Fri, 26 Oct 2007, Steven Walter wrote:
> It is a common workflow to run "git fetch; git rebase origin/<foo>" > Where foo is the remote tracking branch. git-rebase should default to > using the remote tracking branch if no other ref is given.
This is potentially dangerous, as git-rebase does not use a detached HEAD to replay the operations. Therefore you cannot go back easily when you started "git rebase" just to see its usage, and instead it did unwanted things.
So I really think that you need a patch before this one, so that
git reset --hard <branchname>@{1}goes back to the pre-merge state after an inadvertent rebase. (Note: this behaviour is already implemented in rebase -i, because detached HEAD was available at that time, as opposed to the time when git-rebase was written.)
Ciao, Dscho