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
Describe the bug
When you have a tag and branch with the same name (foobar) in my case, you cannot press gh on the branches tab to reset to the foobar branch.
Expected behavior
Expect to go to "Commit 2", and you actually go to "Commit 1"
Screenshots
If applicable, add screenshots to help explain your problem.
Version info:
Built off of latest master a0ec22c251c6 git version 2.49.0
Additional context
I'll put a fix in for this shortly, just documenting here for posterity. I'm assuming we just need to make our reset command use a slightly more specific name that disambiguates the two.
From the debug logs, it seems we just run a git reset --hard foobar. I imagine we'll just need to do a git reset --hard refs/heads/foobar as the fix.
The text was updated successfully, but these errors were encountered:
ChrisMcD1
changed the title
Git reset does not work properly when a tag and branch share nam
Git reset does not work properly when a tag and branch share name
May 19, 2025
Describe the bug
When you have a tag and branch with the same name (
foobar
) in my case, you cannot pressg
h
on the branches tab to reset to thefoobar
branch.To Reproduce
Launch LazyGit
Pres
g
h
on branchfoobar
Expected behavior
Expect to go to "Commit 2", and you actually go to "Commit 1"
Screenshots
If applicable, add screenshots to help explain your problem.
Version info:
Built off of latest master
a0ec22c251c6
git version 2.49.0
Additional context
I'll put a fix in for this shortly, just documenting here for posterity. I'm assuming we just need to make our reset command use a slightly more specific name that disambiguates the two.
From the debug logs, it seems we just run a
git reset --hard foobar
. I imagine we'll just need to do agit reset --hard refs/heads/foobar
as the fix.The text was updated successfully, but these errors were encountered: