You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reopened issues/18456 about local tags staying stale in desktop app after git fetch origin --prune #22953
After that, git show v2.3.3 resolved to b0efc1a78ef8b41c57ffa5a1e477f1ad5208d387, and after restarting GitHub Desktop, the UI displayed the tag on the correct commit.
So the issue appears reproducible when a tag is moved/recreated: a normal git fetch --prune leaves the existing local tag stale, and GitHub Desktop continues displaying that stale association. A forced update of the tag ref fixes it.
Release version
Version 3.6.6 (x64
Operating system
Windows x64
Steps to reproduce the behavior
Have 2 computers with github desktop
make computer 1 create a tag on branch and push
make computer 2 fetch and pull, then move the tag
make computer 2 push the new tag location to origin
make computer 1 git fetch origin --prune , check UI
In this screenshot, the computer 1 had the local tag cached on the commit from 1 hour ago.
In this screenshot, the computer 2 and main on remote origin had the tag on the most recent commit (correct)
Triage summary: This is a duplicate of #18456 ("Deleted tag and recreated on different commit is not reflected in client"), which reports the identical root cause (git fetch does not force-update local tag refs that have moved) and was closed in 2024 as expected git behavior requiring a manual --force fetch. The reporter's own repro here reaches the same conclusion — a normal git fetch --prune leaves the stale local tag, and only git fetch origin "refs/tags/<tag>:refs/tags/<tag>" --force updates it.
Initial hypothesis: GitHub Desktop's fetch implementation builds its fetch args in getFetchArgs in app/src/lib/git/fetch.ts lines 9–21, which invokes git fetch --progress --prune --recurse-submodules=on-demand -- <remote> without --force or an explicit tag refspec. Per standard git semantics, a plain fetch will not overwrite a local tag ref if it has diverged from the remote tag's new target (this is git's built-in protection against silently rewriting tag history), so a moved/recreated tag stays stale locally until a forced tag fetch is run — exactly as confirmed by the reporter's manual git fetch origin "refs/tags/v2.3.3:refs/tags/v2.3.3" --force workaround. This matches the explanation previously given by a maintainer in #18456, so no code change has been identified as needed beyond what was already discussed there (e.g., potentially force-fetching tags, which carries its own risk of silently discarding a differently-pointing local tag).
Activity
desktop-triage commentedon Oct 1, 2026
Triage summary: This is a duplicate of #18456 ("Deleted tag and recreated on different commit is not reflected in client"), which reports the identical root cause (git fetch does not force-update local tag refs that have moved) and was closed in 2024 as expected git behavior requiring a manual
--forcefetch. The reporter's own repro here reaches the same conclusion — a normalgit fetch --pruneleaves the stale local tag, and onlygit fetch origin "refs/tags/<tag>:refs/tags/<tag>" --forceupdates it.Initial hypothesis: GitHub Desktop's fetch implementation builds its fetch args in
getFetchArgsinapp/src/lib/git/fetch.tslines 9–21, which invokesgit fetch --progress --prune --recurse-submodules=on-demand -- <remote>without--forceor an explicit tag refspec. Per standard git semantics, a plainfetchwill not overwrite a local tag ref if it has diverged from the remote tag's new target (this is git's built-in protection against silently rewriting tag history), so a moved/recreated tag stays stale locally until a forced tag fetch is run — exactly as confirmed by the reporter's manualgit fetch origin "refs/tags/v2.3.3:refs/tags/v2.3.3" --forceworkaround. This matches the explanation previously given by a maintainer in #18456, so no code change has been identified as needed beyond what was already discussed there (e.g., potentially force-fetching tags, which carries its own risk of silently discarding a differently-pointing local tag).Update tags that moved on the remote when fetching