tags 571050 + upstream
thanks

Frédéric Brière wrote:

> It would be nice if git would serve a big fat (optional?) warning when
> switching branches while in the middle of a rebase or bisect run.

Yes, it would!

One related thread:
http://thread.gmane.org/gmane.comp.version-control.git/82990/focus=83049

I could swear there was an earlier discussion where your suggestion
was actually mentioned, but I couldn’t find it/not sure what came of
it.

AFAICT heavy rebasers tend to use the $PS1 support from
/etc/bash_completion.d/git or similar.  But that’s underadvertised and
fairly tool-specific.

#    3) Consider changing your PS1 to also show the current branch:
#        PS1='[...@\h \W$(__git_ps1 " (%s)")]\$ '

> made this dumb mistake a few times, and got bitten by a rebase --abort
> or bisect reset that ended up sending me back several days/weeks/months
> into the past.

Yes, that sounds obnoxious.  Note that at least you can recover a new
spot to rebase on top of/a few recent bisection points by looking at
the HEAD reflog with a command like ‘git log -g h...@{yesterday}’.

Anyway, work on this would be welcome.  It is tricky because despite
read-tree + checkout-index + update-ref being the “plumbing” way for
scripts to get something like the effect of a checkout, many scripts
use ‘git checkout’ directly, even within git.  Sometimes it is hard to
help humans without breaking robots.

Cheers,
Jonathan



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to