Skip to content

Splitting a commit #2840

Answered by stefanhaller
ribeiropaulor asked this question in Q&A
Jul 28, 2023 · 2 comments · 8 replies
Discussion options

You must be logged in to vote

So far, the only thing I don't how to do in lazygit is reset the HEAD^.

git reset HEAD^

This is very easy in lazygit: navigate one line down, hit g to bring up the "reset" menu, and hit enter (or s) to do a soft reset.

But as Luka said, there are better ways to do such an operation in lazygit: go into the commit that you want to split (by hitting enter on it), "stage" some files or hunks into a custom patch, bring up the custom patch menu (ctrl-p) and choose either "move to new commit" or "move to index".

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@ribeiropaulor
Comment options

Comment options

You must be logged in to vote
7 replies
@bradphelan
Comment options

@stefanhaller
Comment options

@bradphelan
Comment options

@stefanhaller
Comment options

@stefanhaller
Comment options

Answer selected by ribeiropaulor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants