Last Updated: February 25, 2016
· sgtpooki

Git alias to easily create .gitignore file with

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

ignores = !sh -c \"wget --no-check-certificate$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

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