mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
To add a commit at the end of a lower branch of a stack, the obvious way is to create it at the top of the stack and move it down. Outside of a rebase, pressing ctrl+j doesn't get it there. Once the commit is at the bottom of the second branch, the next ctrl+j moves it past the update-ref todo of the first branch and past that branch's last commit. We made it work like this deliberately in #4096. Moving the commit past the update-ref todo only would have required keeping the selection where it is, and this was hard to do. Now that the destination of a move is named explicitly, it is easy. So if the commit below the selected commits is the head of branches of the stack, ctrl+j now moves them past the update-ref todos of all these branches at once, and keeps them selected. The branch marker moves up to the bottom selected commit. The next ctrl+j moves them further into the lower branch. ctrl+k does the same the other way round: if the topmost selected commit is the head of branches, it moves the commits past their update-ref todos first, to the start of the branch above. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>