rm -rf .git
git rm -r --cached some-directory git commit -m 'Remove the now ignored directory "some-directory"' git push origin master
git init git add README.md git commit -m "first commit" git remote add origin https://github.com/Leonuch/flex.git git push -u origin master
This code will remove a git folder