Skip to content

Instantly share code, notes, and snippets.

@anveo
Created December 4, 2013 16:51
Show Gist options
  • Save anveo/7791062 to your computer and use it in GitHub Desktop.
Save anveo/7791062 to your computer and use it in GitHub Desktop.
remove node_modules from git history
git filter-branch --tree-filter 'rm -rf node_modules' HEAD
echo node_modules/ >> .gitignore
git add .gitignore
git commit -m 'Removing node_modules from git history'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment