I\'m currently in the midst of a git rebase --interactive
session, where I\'m editing a commit. I\'m proceeding as suggested by How can I split up a Git commit bur
I adapted some examples in git-commit(1) and git-reset(1):
$ git reset HEAD^
$ git add ... # stage the first part of your split
$ git commit -m 'part one'
$ git commit -a -c ORIG_HEAD # start with the earlier commit message
If you're worried about doing something that might change ORIG_HEAD
, you could instead do:
$ SAVED=$(git rev-parse HEAD)
$ git reset HEAD^
...
$ git commit -a -c $SAVED # start with the earlier commit message