Re: [PATCH 00/28] Use main as default branch name

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

 



Sergey Organov <sorganov@xxxxxxxxx> writes:

> To me "not on a branch [tip]" is also confusing, as in fact you are, as
> is easily seen after you perform a few commits, and now HEAD points
> directly to the tip of the branch (that has no other references).

Aren't you confused about what "on a branch" means?

After either of these two operations, your HEAD may point at the
same commit, but the former is on a branch (the master branch), and
the latter is not.

    git checkout master
    git checkout master^0

The difference between these two states does *NOT* come from which
commit HEAD points at.

The difference comes from what happens when you make a new commit
starting from that state.  The former (i.e. you are on a branch)
grows the branch.  The latter (i.e. you are not on a branch) does
not grow any branch.

This is an unrelated trivia, but did anybody know that we were
pretty much on the detached HEAD all the time for more than a month
of early life of Git, until cad88fdf (git-init-db: set up the full
default environment, 2005-05-30)?



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

  Powered by Linux