Junio C Hamano wrote:
In this sequence: 1$ git checkout $commit_name_that_is_not_a_local_branch 2$ git commit; hack; hack; hack;... 3$ git checkout $branch_name [...] Step #3 is where the state built in the detached HEAD "branch" vanishes into lost-found. The experts argued that #3 is where it is dangerous...
If step 3 is where the danger lies, wouldn't it then be most appropriate to put the warning message there? I.e., warn or refuse to switch branches when currently on a detached head containing new commits, kind of like branch -d's cowardliness. -- Uri Please consider the environment before printing this message. http://www.panda.org/how_you_can_help/ -- 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