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')