Re: Proper way to checkout a tag?

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

 



Dun Peal venit, vidit, dixit 01.12.2010 21:16:
> On Wed, Dec 1, 2010 at 1:51 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
>> The idea is this: when you check out a tag or a remote-tracking
>> branch, it is not to make changes to it.  Tags are unchanging,
>> remote-tracking branches track remote state that the user does not
>> directly control.
> 
> Yes, users checkout a release tag just so they can build parts of it.
> There's definitely no intention of creating new changes on top of
> them, and if there is then it should properly be a head (branch).
> 
> I guess that's exactly the use-case for detached HEAD, so I guess the
> answer is that we should all stop being afraid of that superficially
> scary term.

It's really one of the most useful features of git (as Jonathan
explained). There are two things which make it scary:

- The name. We could call it differently (free head, unbound head,
branchless head, west coast head...).

- The garbage collection. It's easy to commit on top of a detached head
by mistake, and once you switch away from that, it's difficult to find
it again (reflog) and easy to lose (gc/prune).

Though the "throw-away" nature of detached heads is a useful feature, we
could possibly help users who commit on top of them better.

Michael
--
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]