You can also use Joe Blau gitignore.io
Or through the web-interface https://www.gitignore.io/
Or, by installing the CLI tool, it is very simple, just enter the following on the terminal:
Linux:
echo "function gi() { curl -L -s https://www.gitignore.io/api/\ $@ ;}" >> ~/.bashrc && source ~/.bashrc
OSX:
echo "function gi() { curl -L -s https://www.gitignore.io/api/\ $@ ;}" >> ~/.bash_profile && source ~/.bash_profile
And then you can simply type gi
followd with all the platform / environment elements that need gitignore criteria for.
Example
Suppose you are working on a node project that includes grunt and you are using webstorm on linux, then you can type:
gi linux,webstorm,node,grunt > .gitignore
(to create a completely new file)
or
gi linux,webstorm,node,grunt >> .gitignore
(add / add new rules to an existing file)
bam you can go
source share