Git alias to easily create .gitignore file with gitignore.io
Add this to your git config file (edit your global config with git config -e --global) to easily add a .gitignore file to your project from gitignore.io:
ignores = !sh -c \"wget --no-check-certificate https://www.gitignore.io/api/$1 -O .gitignore\"
NOTE: Mac/Linux users may need to fidget with the syntax a bit (I'm on windows, using msysgit)
git ignores "phpstorm,javascript,somethingelse,whatever,blah,blah"
you wget will create a gitignore file for you that includes the commonly ignored files as per gitignore.io
NOTE 2: this command does overwrite any existing .gitignore file. You could change the command to append if you like, or create a slightly different command that appends if you want
Written by Russell Dempsey
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Related Tags
#shell
#terminal
#aliases
#gitignore
#alias
#command line
#cli
#easy
#git
#.gitignore
#gitignore.io
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#