This is a git command to remove an specific file from a commit $ git checkout HEAD~ path/to/file $ git commit --amend