Splitting a commit #2840
-
I would like to know how to achieve the same result as described in the git book's section So far, the only thing I don't how to do in lazygit is reset the HEAD^. git reset HEAD^ So far, I am doing the the following steps.
Done! I end up having the original commit split in "commit-1" and "commit-2". The only thing that I don't how to do in lazygit, in this case, is |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Please take a look at the introductory video, I think patch building is demonstrated there, around the 8 minute timestamp. |
Beta Was this translation helpful? Give feedback.
-
This is very easy in lazygit: navigate one line down, hit 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". |
Beta Was this translation helpful? Give feedback.
This is very easy in lazygit: navigate one line down, hit
g
to bring up the "reset" menu, and hit enter (ors
) 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".