Automatically generate gitignore

We use Git a lot when working on projects, but not all of the files we need to put into github, such as datasets, virtual environments, and configuration files. So we need to configure .gitignore to automatically ignore these files that don’t need to be added to the Git admin. Configuring .gitignore is usually tedious because you need to add all the uncessary files.

ignr is a tool which can generate .gitignore files automatically. It is implmeneted by Python.

Install

If you already installed python and pip, then you can execute the following command:

1
pip install ignr

Usage

The ignr supports over four hundred different .gitignore templates, which we can view with theignr -lcommand or search for with the ignr -s command. For example:

1
ignr -s python

Searches for supplied query in list of available templates from gitignore.io.

1
ignr -n python

It will generate python’s project gitignore file in the currect directory.

----- End Thanks for reading-----