DEV Community

Discussion on: Splitting a commit with git rebase

Collapse
 
jessekphillips profile image
Jesse Phillips

Rather than use a reset, I suggest amending with Git gui. Also consider using partial commits to break up charges even more.

Collapse
 
erikthered profile image
Erik Nelson • Edited

I'm most comfortable with the git CLI, so that's what I wrote the instructions using. Reset vs amend shouldn't matter much, the hash is going to change regardless. Amend would preserve the message I suppose.

The CLI actually lets you stage individual lines too, check out interactive staging. But I've used GUIs like git-cola for this purpose before, so you can use whatever you're most comfortable with.

Collapse
 
jessekphillips profile image
Jesse Phillips

Oh most certainly, I showed off the amend and line manipulation to someone and got the response that they use the command line as though that was an excuse not to do it.

If cli works, great, find it too hard for certain operations, get a different tool.