Friday, November 19, 2021

Branch Vs Tag

Branch

A “branch” is an active line of development. The most recent commit on a branch is referred to as the tip of that branch. The tip of the branch is referenced by a branch head, which moves forward as additional development is done on the branch. A single git repository can track an arbitrary number of branches, but your working tree is associated with just one of them (the “current” or “checked out” branch), and HEAD points to that branch.

 Tag

A ref pointing to a tag or commit object. In contrast to a head, a tag is not changed by a commit[...]. A tag is most typically used to mark a particular point in the commit ancestry chain.A tag points to a specific commit on any branch. You cannot add more code to a tag

git tag -n

Get an extensive description of your tag list

git tag -a <tag-name> -m <msg string in quotes>