I committed some files and tried to push them to the remote repository. However, I found a large video file in the list and terminated the pushing. And then I tried to delete the file from the list and pushed again.
$git commit -m "comments" -a
$git push origin my_branch
... # I found mp4 file here and terminated push
$git rm --cached path/to/mp4
$git commit -m "comments" -a
$git push origin my_branch
Problem
git still tried to push the mp4 file to repo.
Question How do I avoid the deleted file pushing to remote repo?
PS
I also tried git rm path/to/mp4
, the file has removed from my directory but git still tried to push the file to repo