Skip to content

Instantly share code, notes, and snippets.

@misraX
Last active February 21, 2017 02:39
Show Gist options
  • Save misraX/d31f0c979900d7c0e2b8f7d9fc210a21 to your computer and use it in GitHub Desktop.
Save misraX/d31f0c979900d7c0e2b8f7d9fc210a21 to your computer and use it in GitHub Desktop.
Bash script to remove folders recursively from git cached
#!/bin/bash
for i in $(cat .gitignore); do echo $i && git rm -rf --cached $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment