Skip to content

Commit

Permalink
Merge pull request #1 from matiassingers/patch-1
Browse files Browse the repository at this point in the history
Improve .gitignore util by appending to .gitignore if file already exists
  • Loading branch information
kqr committed Jan 3, 2018
2 parents e6fe788 + 4f452e2 commit 952327f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/gi
Expand Up @@ -8,7 +8,9 @@ elif [[ $1 = list ]]; then
echo "$result"
else
if [[ -f .gitignore ]]; then
echo ".gitignore already exists, aborting."
result=`echo "$result" | grep -v "# Created by http://www.gitignore.io"`
echo ".gitignore already exists, appending"
echo "$result" >> .gitignore
else
echo "$result" > .gitignore
fi
Expand Down

0 comments on commit 952327f

Please sign in to comment.