Skip to content

Instantly share code, notes, and snippets.

@gelinger777
Created February 19, 2016 15:40
Show Gist options
  • Save gelinger777/c9ad3a293d205801319b to your computer and use it in GitHub Desktop.
Save gelinger777/c9ad3a293d205801319b to your computer and use it in GitHub Desktop.
Remove the folder from git
git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD
echo node_modules/ >> .gitignore
git add .gitignore
git commit -m 'Removing node_modules from git history'
git gc
git push origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment