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
| https://stackoverflow.com/questions/17901588/new-repo-with-copied-history-of-only-currently-tracked-files | |
| git remote | while read -r line; do (git remote rm "$line"); done | |
| git tag | xargs git tag -d | |
| git branch | grep -v \* | xargs git branch -D | |
| git stash clear | |
| git config --local -l | grep submodule | sed -e 's/^\(submodule\.[^.]*\)\(.*\)/\1/g' | while read -r line; do (git config --local --remove-section "$line"); done | |
| rm -rf .git/modules/ | |
| git ls-files | sed -e 's/^/"/g' -e 's/$/"/g' > keep-these.txt |