jesseduffield / lazygit

simple terminal UI for git commands
MIT License
48.1k stars 1.73k forks source link

Search by commit hash in Remotes / Local Branches / Tags #3265

Open all500234765 opened 5 months ago

all500234765 commented 5 months ago

Is your feature request related to a problem? Please describe. When reviewing someone I ask for commit hash or branch name. Some times there will be a branch with multiple commits and i'd need to find a specific one.

Describe the solution you'd like

  1. Go into Remotes tab
  2. Select and enter to the specific remote to search in
  3. Press / to start search
  4. Paste commit hash
  5. Search results should show branches with relevant commits

Describe alternatives you've considered

  1. Using tortoise git to search for specific commit by hash
  2. Ctrl + o on random commit in Commits window, then replacing hash in the link, looking at the branch and then going into Remotes/origin search for the branch.
  3. Always ask for the branch name (sometimes will require to ask for the specific commit i should review too). Still good, but could be improved

Additional context Quick google search revials that git can do this very easily. git branch -r --contains <commit hash>

This command lists all remote branches that have specified commit.

Searching by partial commit name would be good, like searching by specific ticket number, since sometimes you can end up with a branch that has multiple different commits with different tickets they relate to.

TheLazyLemur commented 3 months ago

Hey everyone.

Would you be happy if I worked on this issue?