How to remove a directory from git repository?
Checkout you branch on local machine
$ git checkout <Your-Branch-Name>
Used following commands to remove Directory from git
git rm -r <Your-Directory-Name> git commit -m "your-message" git push origin <Your-Git-Branch>
If you want to remove directory from only git but not from local, used following command
git rm -r --cached <Your-Directory-Name>
Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.
Yes0
No0