diff --git a/bin/git-ignore b/bin/git-ignore index 84166f5..e0c1474 100755 --- a/bin/git-ignore +++ b/bin/git-ignore @@ -5,6 +5,6 @@ if test $# -eq 0; then else for pattern in $@; do echo "... adding '$pattern' to .gitignore" - echo $pattern >> .gitignore + (test -f .gitignore && grep -q $pattern .gitignore) || echo $pattern >> .gitignore done fi