How do you work from an old tag, and can you move or delete a tag?
Checking out a tag puts you in detached HEAD, so create a branch from it with git switch -c fix v1.0. You can delete a tag with git tag -d, but moving a published tag confuses others and should be avoided.
Explain it simply
A tag is a fixed milestone, like the 1.0 mark on a ruler. You can stand there and look around, but you should not move the mark.
For a hotfix on an old release, create a branch at the tag: git switch -c hotfix/1.0.1 v1.0. Locally you can delete (git tag -d) or force-move (git tag -f) a tag, but if it is already pushed, others keep the old target and the tag silently differs between machines. Make a new tag such as v1.0.1 instead.
Example
git switch -c hotfix/1.0.1 v1.0
# ... fix, commit ...
git tag -a v1.0.1 -m "Hotfix"
git push origin hotfix/1.0.1 v1.0.1What to say in the interview
"Checking out a tag detaches HEAD, so I branch from it for fixes. I avoid moving a pushed tag, because other clones will not update it. A fix gets a new tag such as v1.0.1."
Common mistakes
- Force-moving a tag that teammates or CI have already used.