Created
November 24, 2017 18:10
-
-
Save entrptaher/0c0ca5d643eb8a0add78036eb64f6821 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you mistakenly pushed node_modules and want to remove it from repo along with the history but want to keep other files intact, then you can use the following. | |
It'll search for node_modules directory and remove it. | |
``` | |
git filter-branch --force --index-filter \ | |
'git rm -r --cached --ignore-unmatch node_modules' \ | |
--prune-empty --tag-name-filter cat -- --all | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment