On Thu, Feb 28, 2019 at 06:15:54PM +0300, Konstantin Khomoutov wrote: [...] > > The asterisk ('*') is a marker to indicate the current branch. > > > > The '->' symbolised 'has moved to', so we have that the special variable > > FETCH_HEAD now hold the hash name of the develop branch. > > I would still say it's not a "special variable" but rather a "special > reference" - to stay within the official Git lingo. > > To the OP: a reference in Git is any symbolic name which refers to > something. Branches and tags are references, and so are special ones - > such as HEAD, ORIG_HEAD, FETCH_HEAD, MERGE_HEAD and so on.
To try to provide more insight on this - a reference (usually abbreviated to just "ref") can be used anywhere one would want to refer to a commit. For instance, the special ref FETCH_HEAD is updated by the `git fetch` command, and can be used, for example, to merge the just fetched changes into the current branch. Not surprisingly, that's basically what `git pull` does behind the scenes: it runs `git fetch` and then `git merge FETCH_HEAD`. The FETCH_HEAD ref is "more special" than the rest of the special refs in that it can hold more than one record at a time - because it's possible to fetch multiple branches at the same time. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.