1 2 3 4 5 6
#!/usr/bin/env sh git status --porcelain=v1 | grep "^??" | cut -d' ' -f2- | sed 's/^"\(.*\)"$/\1/' >> .gitignore cat .gitignore | sort | tee .gitignore > /dev/null