Reputation: 4659
I've multiple folders in one repo. Originally was working on folder3 and pushed commits. Then I decided to change the name of my folder3 to folder3A and pushed to github. Then I deleted the folder3 locally using rm -rf folder3
and then pushed the commit. Now the problem is none of the below commands work if i want to remove the folder3 in my github repo since the file is not found locally:
git rm -r --cached folder3
, git rm -rf obj
both gives this error: fatal: pathspec 'folder3' did not match any files
. How do I remove just one folder that has been deleted locally but is still present on github?
Upvotes: 0
Views: 59
Reputation: 860
Just add everything in that is in your directory right now and have github sync with your folder.
git add *
git commit -m "removed a folder"
git push origin master
Upvotes: 1