Without creating a branch and doing a bunch of funky work on a new branch, is it possible to break a single commit into a few different commits after it\'s been committed to
If you have this:
A - B <- mybranch
Where you have committed some content in commit B:
/modules/a/file1
/modules/a/file2
/modules/b/file3
/modules/b/file4
But you want to split B into C - D, and get this result:
A - C - D <-mybranch
You can divide the content like this for example (content from different directories in different commits)...
Reset the branch back to the commit before the one to split:
git checkout mybranch
git reset --hard A
Create first commit (C):
git checkout B /modules/a
git add -u
git commit -m "content of /modules/a"
Create second commit (D):
git checkout B /modules/b
git add -u
git commit -m "content of /modules/b"