News for hackers. Stuff that matters.
Re:What comes after Git by prettyStandard on Tuesday July 05, 2022 @11:23AM (#31989302)
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

There are no comments on this comment yet.