Removing a file from commit #2281
-
A workflow I occasionally have to do happens when I realize that a commit somewhere in my log has unrelated changes - those changes will need to be extracted to their own commit. Let's say I have two commits, one which installs a tool to optimize svg files and a second later commit which actually optimizes the svg files in the repo. while inspecting the second commit i notice there are changes to package.json - whoops! I need to move that change to the previous commit, and maybe there are other commits in between, complicating things. So i'll open lazygit, navigate to the commit in question, and hit
I'd prefer to do this workflow entirely in lazygit. Are there tools to do this already that I just missed out on? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can select the files you wanna bring across by pressing space and then if you go Ctrl+p there's an option to move those files to another commit. That ought to do what you want :) |
Beta Was this translation helpful? Give feedback.
You can select the files you wanna bring across by pressing space and then if you go Ctrl+p there's an option to move those files to another commit. That ought to do what you want :)