I would start by doing a
git reset --soft HEAD^
This would take you back in the commit history to the previous commit, just before your big commit, while preserving on disk the changes you made in the last commit.
Next step would be to create a new branch at this commit, to create your two new commits in.
git checkout -b new-branch-name
Since you have changed a lot of files I would then recommend a nice Git GUI to be able to easily pick and choose what to put in which of the commits. With a good enough GUI it is even easy to pick and choose separate sections of files to go in different commits.
Many IDEs have great Git integrations and plugins that can help you with staging different chunks of files instead of whole files.
Some IDEs I use that support this are:
- VS Code with the GitLens plugin
- IntelliJ
Some Git GUIs that I use that support this are:
Use whatever tool you feel comfortable with and do the staging and committing with.
After your first commit, you should run your unit tests without the remaining changes that you want to have in the next commit. Here you can employ the stash command
git stash
This will create a stash with the files that have uncommitted changes. Now your working directory is clean and you can run your tests.
If you missed something you can pop the stash, i.e. the uncommitted changes, back into the the working folder using
git stash pop
Then make additional changes to the first commit with the GUI and redo the commit with the additional changes (i.e. amend) using
git commit --amend
Repeat the testing until done and then the last step would be to create a new commit with the remaining changes and of course also test them.
git stash pop
git add . # Assuming you are in the repo root folder
git commit -m "<good commit message>"
You now have the original commit split up into two commits on your new branch and can push it to the server for review.