1
0
Fork 0
Scripts/git-exclude-dev-files.sh
2021-06-30 00:36:37 +02:00

15 lines
461 B
Bash
Executable file

#!/bin/bash
# Ignore user-specific dev files without cluttering the gitignore files.
# Other team members may not care that you use Vim, VS Code, an IDEA product or
# whatever, so it is a bit weird to commit your own specific tooling ignore
# patterns into the project. Use your local exclude file instead.
exclude() {
if ! grep "$1" .git/info/exclude > /dev/null ; then
echo "$1" >> .git/info/exclude
fi
}
exclude '.*.swp'
exclude '.vscode/'