https://github.com/loupeznik/ignoreinit
A tool for creating .gitignore files from the command line
https://github.com/loupeznik/ignoreinit
cli gitignore gitignore-cli go
Last synced: 26 days ago
JSON representation
A tool for creating .gitignore files from the command line
- Host: GitHub
- URL: https://github.com/loupeznik/ignoreinit
- Owner: Loupeznik
- License: mit
- Created: 2022-10-14T16:12:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2026-04-26T10:55:36.000Z (26 days ago)
- Last Synced: 2026-04-26T11:17:53.386Z (26 days ago)
- Topics: cli, gitignore, gitignore-cli, go
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ignoreinit


Ignoreinit is a tool for creating .gitignore files from the command line. Gitignore files are pulled from [github/gitignore](https://github.com/github/gitignore) repo.
## Usage
### Create new .gitignore
Creates new .gitignore based on given language in defined location (either relative or absolute).
```bash
ignoreinit init
```
### Replace existing gitignore
Replaces existing .gitignore based on given language in defined location (either relative or absolute).
```bash
ignoreinit replace
```
### Merge existing gitignore
Merges a gitignore for given language into existing .gitignore in defined location (either relative or absolute).
```bash
ignoreinit merge
```
## Build from source
```bash
git clone https://github.com/Loupeznik/ignoreinit
cd ignoreinit
go build -o build/ignoreinit github.com/loupeznik/ignoreinit
```
## Run with Docker
```bash
# Create .gitignore in the current directory
docker run --rm --user "$(id -u):$(id -g)" -v ${PWD}:/work loupeznik/ignoreinit:latest init go .
# Create .gitignore in another directory directory
docker run --rm --user "$(id -u):$(id -g)" -v $HOME/projects:/work loupeznik/ignoreinit:latest init go .
```
## Install
### Install via Snap
[](https://snapcraft.io/ignoreinit)
*Ignoreinit* is available as a [snap](https://snapcraft.io/ignoreinit) for *amd64* and *arm64* based systems.
```bash
sudo snap install ignoreinit
```
### Install via Homebrew
```bash
brew install --cask loupeznik/tap/ignoreinit
```
### Install via AUR
```bash
yay -S ignoreinit-bin
```
### Install via go
You may either install the executable directly into `$GOPATH` or download it from the [release page](https://github.com/Loupeznik/ignoreinit/releases).
```bash
git clone https://github.com/Loupeznik/ignoreinit
cd ignoreinit
go install github.com/loupeznik/ignoreinit
```
Or simply install the latest version with Go without needing to clone the repo:
```bash
go install github.com/loupeznik/ignoreinit@latest
```