Re: [RFC] Detached-HEAD reminder on commit?
- From
Matthieu Moy <matthieu.moy@imag.fr>
- Date
- Sep 2, 2008, 20:26 UTC
- Message-ID
- <vpq3aki1eh6.fsf@bauges.imag.fr>
- In-Reply-To
- <1220383905-48316-1-git-send-email-pdebie@ai.rug.nl>
Pieter de Bie <pdebie@ai.rug.nl> writes:
Show 6 quoted lines
> + if (!strcmp("HEAD", head))
> + printf("You are on a detached head, so this commit "
> + "has not been recorded in a branch.\n"
> + "If you don't want to lose this commit, checkout a "
> + "branch and then run:\n"
> + " git merge %s\n", sha1_to_hex(sha1));I'd say
+ "If you don't want to lose this commit, run " + "git branch <some-name>\n" + "to create a named branch for the commit you just made");
(or whatever better wording you find, but I think suggesting to name the branch makes more sense that merging it)
-- Matthieu