Gitignore windows cmd util

Posted: [Source]
Tags:  bash cmd command-line git gitignore linux windows zsh

Simple utility that lets you generate .gitignore using cmd/shell. You must have curl in your path.

  • windows/cmd: gitignore.cmd
@echo off
curl -sL https://www.toptal.com/developers/gitignore/api/%*
  • linux - add function into your aliases file or .*rc
    • function for alias
    function gitignore() { curl -sL https://www.toptal.com/developers/gitignore/api/\$@ ;}
    • zsh - code to run to add function to .zshrc
    echo "function gitignore() { curl -sL https://www.toptal.com/developers/gitignore/api/\$@ ;}" >> ~/.zshrc
    • bash - code to run to add function to .bash
    echo "function gitignore() { curl -sL https://www.toptal.com/developers/gitignore/api/\$@ ;}" >> ~/.bashrc

and than you can type:

gitignore python,pycharm,django