Re: [PATCH] Proof-of-concept patch to remember what the detached HEAD was

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 14, 2009 at 12:44 AM, Daniel Barkalow <barkalow@xxxxxxxxxxxx> wrote:
>  $ git commit
>  You've been sightseeing "origin/master". The commit can't change that
>  value, so your commit isn't held in any branch. If you want to create
>  a branch to hold it, here's how.
>
> "git checkout origin/master" should be similar in complexity to
> "svn checkout -r 8655"; the difference is that svn won't let you
> commit then and git will but you'll need to understand the
> implications if you do so. If you don't commit (because you don't want
> to make any changes, because you don't think it would be possible, or
> because you don't want to worry about what would happen), there's no
> meaningful difference, and you don't need to be told.

Huh, I hadn't seen this message before I wrote in a reply to
"builtin-checkout: suggest creating local branch" that we do the
following at commit, which I think is what you're suggesting:

$ git commit -m "blah"
Cannot commit while not on any branch. Please use git commit -b <branch> to
specify the name of a new branch to commit to, or use git commit -f to
force a detached commit.

I'm not sure that requires the complexity of remembering how the user
got detached though?

j.
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]