Last active
January 5, 2016 19:01
-
-
Save thebentern/6c26162fb8feacac04b3 to your computer and use it in GitHub Desktop.
Unchuck git repo
This file contains 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
$reader = [System.IO.File]::OpenText("GitChuck.txt") | |
try { | |
cd C:\Users\Source\MyRepo | |
for(;;) { | |
$line = $reader.ReadLine() | |
if ($line -eq $null) { break } | |
if($line -like '*bin*' -Or $line -like '*obj*' -Or $line -like '*suo*' -Or $line -like '*user*') { | |
git rm --cached $line | |
} | |
} | |
} | |
finally { | |
$reader.Close() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment