jesseduffield / jesseduffield/lazygit

"Go to parent/child" navigation in commit graph

Open
#3,974 5 comments 13 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Is your feature request related to a problem? Please describe.**

Before switching to lazygit, I used a GUI that had a keybinding to go to the commit's first parent (usually the merge parent, in the case of a merge commit).

I find myself missing this feature when looking at the full commit graph for context, but wanting to follow a specific branch.
Also, the inverse operation of navigating to the last(?) child.

**Describe the solution you'd like**

I would like to have keybinds that act in the manner described above, navigating to the commit's parent or child.

Proof-of-concept implementation of the go-to-parent functionality here: https://github.com/zhennTil/lazygit/tree/feature/goto-parent -- demo below.

It still needs some robustness, and the go-to-child part which is a bit more difficult, but I will gladly finish this and open a PR, if there is interest.

**Describe alternatives you've considered**

Perhaps this is possible with custom commands, but I could not find a way to trigger GUI actions from custom commands -- maybe I simply missed that, or it is not currently possible.

**Additional context**

![gtp](https://github.com/user-attachments/assets/55828705-60c2-41e0-90f2-ddc64d81c6a2)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.