Does a git tag point to a specific sha1, a specific commit on a specific branch, or something else?
This question is extremely similar to What happen to Git tags pointing to a removed commit, but I am unable to find the answer I am looking for there.
Let's use the following example:
C (Branch, cut with same commit history)
|
A-----B-----C (Main)
I'm trying to help myself answer the following questions:
If I tag commit C on Main before cutting Branch, does my tag apply to Main and/or Branch?
If I tag commit C on Main after cutting Branch, does my tag apply to both Main and/or Branch?
If I tag commit C on Branch after cutting Branch, does my tag apply to both Main and/or Branch?
What happens if there is a different commit history? For example, does anything change with the following:
C-----D-----E (tag on E in either the main branch or this branch) | A-----B-----C-----E
edit: looks like #4 is impossible because a commit cannot have the same hash if the parent is different