Skip to content

Commit

Permalink
Merge pull request #479 from JanSchulz/global_gitignore
Browse files Browse the repository at this point in the history
Add more info how to set global gitignore
  • Loading branch information
hemanth committed Nov 3, 2015
2 parents 1d8534b + b4f4dd1 commit 35e1f78
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/git-ignore
Expand Up @@ -14,7 +14,15 @@ function show_global {
}

function add_global {
add_patterns `git config --global core.excludesfile` "$@"
local global_gitignore=$(git config --global core.excludesfile)
if [ -z "$global_gitignore" ]; then
echo "Can't find global .gitignore."
echo ""
echo "Use 'git config --global --add core.excludesfile ~/.gitignore-global' to set the path to your global gitignore file to '~/.gitignore-global'."
echo ""
else
add_patterns `git config --global core.excludesfile` "$@"
fi
}

function show_local {
Expand Down

0 comments on commit 35e1f78

Please sign in to comment.