Reputation: 5453
I have added a folder (which was previously synchronized) to my .gitignore file.
Fine. Now when I make a git add -A, git commit -m "ok", git push, I still see this folder in my distant rep.
I'd like that folder to be completely ignored and not appear in my distant rep. Can I remove it from those distant rep ?
Upvotes: 1
Views: 79
Reputation: 1325137
You need to record the deletion of that folder in your repo first, and push that deletion to your distant repo:
(The --cached
option of git rm
allows you to remove an element from the Git index without deleting it from the working tree on the disk itself)
git rm --cached -r yourFolder
git commit -m "remove folder"
git push
Then:
.gitignore
will ignore that folderUpvotes: 1