+2 votes
in General by (11.2k points)
How can I delete a folder present in the master folder of the Github repository?

1 Answer

0 votes
by (17k points)

To remove a directory from both the Github repository and local machine, use the following three commands:

git rm -r YOUR_DIRECTORY
git commit -m "Remove the directory"
git push origin <your-git-branch> (typically 'master')

To remove a directory from the Github repository but not from the local machine,use the following three commands:

git rm -r --cached YOUR_DIRECTORY
git commit -m "Remove the directory"
git push origin <your-git-branch> (typically 'master')

...