Re: Difficulties in advertising a new branch to git newbies
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:51
Theodore Tso [off-list ref] writes:
... Just because we don't have a name to that precise commit inside the git system doesn't necessary mean the user can't get back there. In fact, the user probably could via "history | grep 'git checkout'".
If you mean grep 'git checkout|git reset' perhaps. After checking out a specific commit (because the user was told about the commit out-of-band, say, via e-mail), the user can still visit other commits with e.g. "git reset --hard HEAD~20".
quoted
So "until you make commits" is not sufficient, which means that covering all the way you can make commits isn't, either.My personal belief is that covering all the way you can make commits is where you want to be putting the check. If I say something like git checkout f00b51b8 There's nothing dangerous about that statement.
I do not think anybody is arguing that particular checkout is dangerous. The warning message is about the fact that your HEAD is now detached, which might not have been what you intended (and you will later get a real warning when you do a really dangerous thing, which is "to come back and lose your point").