how to remove from git already added folder

Jul 27, 2017 08:51

I forgot to add .ipynb_checkpoints folder to .gitignore file, so it has been committed to git. I should follow these steps for removing the folder from server :

  • add this folder to .gitignore file (using nano, vi, etc.)

  • run these commands:

git rm -r --cached .ipynb_checkpoints/
git commit -m 'Remove the now ignored directory ".ipynb_checkpoints"'
git push origin master

git

Previous post Next post
Up