Skip to content

Show commit hashes in command log when deleting branches#5289

Open
cokert wants to merge 1 commit intojesseduffield:masterfrom
cokert:show-deleted-branch-hash
Open

Show commit hashes in command log when deleting branches#5289
cokert wants to merge 1 commit intojesseduffield:masterfrom
cokert:show-deleted-branch-hash

Conversation

@cokert
Copy link

@cokert cokert commented Feb 13, 2026

PR Description

When you delete a branch, git tells you the hash it pointed to ("Deleted branch foo (was abc1234)") but lazygit was throwing that away. Now LocalDelete captures the output and we parse the hashes out, appending them to the logged command so you can rescue a mistakenly deleted branch without spelunking through reflog.

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • [n/a] Text is internationalised (see here)
  • [n/a] If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • [n/a] Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

When you delete a branch, git tells you the hash it pointed to
("Deleted branch foo (was abc1234)") but lazygit was throwing that
away. Now LocalDelete captures the output and we parse the hashes
out, appending them to the logged command so you can rescue a
mistakenly deleted branch without spelunking through reflog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant