3 ms·
To split a commit... 1. Make a new commit to revert what you to come last 2. Make a new commit to revert what you want to come first 3. Make a new commit to
by prettyStandard 4y ago
To split a commit...
1. Make a new commit to revert what you to come last
2. Make a new commit to revert what you want to come first
3. Make a new commit to restore/revert line 2 above
4. Make a new commit to restore/revert line 1 above
5. Squash original into lines 1 & 2 above
Alternatively you can use interactive rebase,
1. set edit on the commit you want to split
2. When the rebase stops, `git reset --soft HEAD~1` (I think)
3. `git add` and commit as necessary then follow up with git rebase --continue