How to remove a file from a git commit

07 September 2016

If you need to quickly remove a file from a commit you just made …

git checkout <commit sha> <path to file>

git commit --amend

and rewrite the commit message without the file.

If you need help solving your business problems with software read how to hire me.



comments powered by Disqus