I cloned the mosquitto repo that has tag v1.4.9
. However the tagged commit does not appear to be on a branch.
How could that happen? Does the author actually keep a branch on his own repo but only push tags from that branch to GitHub? Or does he just make a commit to a tag?
I made the tag into a local branch
$ git checkout -b work149 v1.4.9
and looked at the last commit on the branch:
$ git log -1
commit 91bfd82491f90e24b6fe9c036f0b04a1f5c14a89
Merge: bf959ef 2d0af73
Author: Roger A. Light <roger@atchoo.org>
Date: Thu Jun 2 22:05:34 2016 +0100
Merge branch 'fixes'
This commit is one ahead of the fixes
branch.
With git log --graph
I can see an earlier commit on the same branch (not the fixes
branch, but a branch I'm trying to understand):
* | commit bf959ef9b0ae0e4d74bf80158ffb0b7c69da533d
|\ \ Merge: 646e0a0 5cca6b4
| |/ Author: Roger A. Light <roger@atchoo.org>
| | Date: Sun Feb 14 14:38:42 2016 +0000
| |
| | Merge branch 'fixes'
| |
How do you find out whether a tag is on a branch and on which branch? Does the leftmost vertical bar indicate a branch and where is that branch on the remote?
Is this a common practice?
The discussion thread “Git pull doesn’t get the tags” mentions “branch heads that are being tracked” and “non-commits.” I wonder whether the git clone
command configures the clone not to track all the branches on the remote or the repo has somehow made the tags into non-commits?