Reputation: 28525
My friend accidentally added some obj files on to our remote repo. Now, on my machine, when I tried to do git pull
, it complained that these .o
files would overwrite mine locally. As those are unnecessary files, I did git rm --cached
on every file that git pull
complained on.
Even after this, if I do git pull
, I am getting the same overwrite errors. My doubt is, I've deleted the unwanted the files from the remote repo itself. Then why is git still complaining about them?
Upvotes: 0
Views: 48
Reputation: 9609
git rm --cached
does not remove any files, it just unstages files so that they won't be committed but they are still left in the working tree. You need either git rm
without --cached
(to commit the removal to the remote repository) or rm
without git
(to remove local files).
Upvotes: 1