useful git commands

merge multiple branches in one command. git will walk back the paths until all branches have the same parent

git merge branch1 branch2 branch3

create an annotated tag (unlike a reference tag, writes an object to .git/objects).

git tag -a <tag_name>

show most recent annotated tag that's reachable from a commit:

git describe <branch>

show most recent reference tag that's reachable from a commit:

git describe --tag <branch>

For my examples below, I'll be referring to commits from a repo of mine. For this repo, my initial commit's unique identifier (long hash) is: 2dd4049fec2546f8fc40e6218e971ff701edba39 and its short hash is: 2dd4

Take any kind of short hash and turn it into its unique identifier. (Note: rev-parse of an annotated tag gives you an object. Whereas, rev-parse of a reference tag gives you a pointer to an actual commit.)