After rebasing and force-pushing, the release tag `v2.1.0` is no longer on any branch.
AdvancedTroubleshootingLost Work, HEAD and History Problems
Answer
Likely causes → A tag points at a specific commit SHA. Rewriting history created new commits, so the tag still points at the old ones.
Diagnose →
git branch -a --contains v2.1.0 # empty output means orphaned
git log --oneline -1 v2.1.0
git cherry -v main v2.1.0^{}
Fix → Decide which is the truth. If the shipped artifact was built from the old commit, keep the tag and merge or cherry-pick the old line back, or document the divergence. If the tag was meant to follow the new history, re-tag only if no one has consumed it. Otherwise cut v2.1.1.
Prevent → Never rewrite history that carries tags, and protect main and release branches from force pushes.
More on Lost Work, HEAD and History Problems
`fatal: Unable to create '/repo/.git/index.lock': File exists.`BeginnerYou added a file to `.gitignore`, but `git status` still shows it as modified.Beginner`fatal: your current branch 'main' does not have any commits yet`Beginner`Author identity unknown *** Please tell me who you are.` and `fatal: unable to auto-detect email address`Beginner`fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.`BeginnerYour commits do not show on your GitHub profile contribution graph.Intermediate