gitignore

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: MIT

README

gitignore - A simple .gitignore generator

A simple cli tool written in go to generates gitignore files for different projects.

Installation

Download

You can download the latest release here. Extract the zip file, and run the executable, like;

cd gitignore && ./gitignore -help

You can add this to your PATH too.

# Linux/macOS
sudo mv gitignore /usr/local/bin/
From Source
  1. Clone the repository:
git clone https://github.com/ddddami/gitignore
cd gitignore
  1. Build the binary.
go build -o gitignore ./cmd/gitignore
  1. Move the binary to your PATH
# Linux/macOS
sudo mv gitignore /usr/local/bin/

Usage

gitignore [template-name]

For example:

gitignore node   # Generates a Node.js .gitignore
gitignore python # Generates a Python .gitignore

Running gitignore without arguments will display available templates.

Adding New Templates

This is a very simple tool, I added some templates from github/gitignore

To add new templates

Create a new file in the templates directory with the naming convention [template-name].gitignore and add the content

Rebuild the application

Extending the Tool

Some ideas for extending this tool:

  • Add support for combining multiple templates [gitignore node,python gitignore node python]
  • Add support for adding templates to custom dirs
  • Add a flag to append to an existing .gitignore instead of creating/trying to create a new one
  • Fetch templates remotely (from GitHub)

Directories

Path Synopsis
cmd
gitignore command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL