Last active
October 26, 2020 21:10
-
-
Save paddy74/8e98221210aea2156b01a988cc497599 to your computer and use it in GitHub Desktop.
Clean the current git repository of ignored files
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
#!/bin/bash | |
if git tag > /dev/null 2>&1 && [ $? -eq 0 ]; then | |
git rm -r --cached . | |
git clean -dfX | |
git add . | |
else | |
echo "fatal: not a git repository (or any of the parent directories): .git"; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment