Stephan Beyer <s-beyer@xxxxxxx> writes: > I rephrase it as follows to not encourage checking out another branch > (or commit ;]) but to mention that it works to get back if someone > accidentally did it. > > --8<--8<--8<-- > > Bisect next > ~~~~~~~~~~~ > > In case you have marked a commit as bad but you do not know a good > commit, you do not have to crawl through the commit history yourself to > find a good commit. Simply issue the command: > > ------------ > $ git bisect next > ------------ > > This command is also handy when you accidentally checked out another > commit during a bisection. It computes the commit for the bisection > and checks it out again. > > -->8-->8-->8-- > > Is that better? Thanks, I think it is definitely better than the original patch. I cannot say it is better than not having that extra paragraph, though. An immediate recovery after an accidental checkout can be done with "git checkout -", and the only case "bisect next" is safe and better is somebody accidentally checked multiple random commits out without doing anything else (in which case you'd need to ask reflog where the HEAD was in order to use "checkout" to go back). But if they are doing more than just a single "checkout" immediately followed by "oops that wasn't what I intended--now I want to go back", they need more than "bisect next" or "checkout $somewhere" anyway, so... -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html