Remove directory from git and local
You could checkout 'master' with both directories;
git rm -r one-of-the-directories
git commit -m "Remove duplicated directory"
git push origin <your-git-branch>
Here, <your-git-branch> is typically the 'master' branch, but not always/
Remove directory from git but NOT local
If you want to remove this directory from git but not delete it entirely from the filesystem (local system)
In that case, you have to use:
git rm -r --cached myFolder
Want to learn more about frequently used commands in Git? Then visit git commands now.