/ Tools

Creating .gitignore files the easy way automatically!

Its high time that I found an easier way to make .gitignore files for my git repos. My Github feed came to the rescue today and introduced me to gitignore.io.

It works like magic! I use a fish shell and to get gi working is to do the following steps:


Create a file for the function using vim ~/.config/fish/functions/gi.fish and enter the below code



# Credit: https://geowarin.github.io/the-missing-fish-shell-tutorial.html
# Credit: https://github.com/joeblau/gitignore.io

function gi
  curl -L -s https://www.gitignore.io/api/$argv;
end


That's it!

Issue gi list to see the supported languages.

Issue gi node to get a .gitignore for NodeJS.

And yeah ... gi node,R,django >> .gitignore to create a .gitignore file that includes the standard config for node, R and django at one shot! :-)

Animated gif below, created with LICEcap for OSX

Using gi