If you want to keep the file $ git checkout $ git add $ git commit If you want to discard the file $ git rm $ git commit
$ git checkout $ git add $ git commit