i do not use gitignore
i delete *.o in .gitignore
i add back *.o in .gitignore, and use git rm
git rm sample
back git commit