I have a commit we'll call ffffffff
, in which nearly all of the files in my repository were 'recreated' after (we believe) the committing user attempted to clear his git cache. A sampling of the output of git diff-tree -r --root fffffff
is below:
:000000 100644 0000000000000000000000000000000000000000 046c26d49dce17a235c5d3a6ae68b5ca3d92b1d7 A .gitignore
:000000 100644 0000000000000000000000000000000000000000 c3326e41785be00452c0351076bfa066f82aadc4 A README.md
:000000 100644 0000000000000000000000000000000000000000 603785805443e956172463b45738c953323407c0 A api/.checkstyle
:000000 100644 0000000000000000000000000000000000000000 81120da5367551fad21c489022f63bcbf0b5c344 A api/.gitignore
:000000 100644 0000000000000000000000000000000000000000 350b725cb2df7907af4591826aa3ca2c0d0b9b10 A api/Dockerfile-deploy
:000000 100644 0000000000000000000000000000000000000000 1e9376a5932abdc47c6cc233db0c8c9c50cecb46 A api/Dockerfile-dev
:000000 100644 0000000000000000000000000000000000000000 d34d14b7e5984b56645a96e8ad394307f61a1299 A api/build.gradle
... and so on, for over 3000 files.
The biggest symptom of this commit is that it confuses IntelliJ, which appears to not follow the file's history prior to this, and instead shows only one commit in the file's history: fffffff
. I can still view the file's history with something like git log --follow -p <FILENAME>
, but this is less preferable. IDEs are supposed to be integrated after all, aren't they? ;)
So my question is this. What is the ideal way to remove this commit, assuming all other commits surrounding it were good? A simple git revert fffffff
will show all those files as being deleted, so this does not work. I'm told rebase may be the place to look for a solution.