https://github.com/ddddami/gitignore
Generate gitignore templates in your teminal
https://github.com/ddddami/gitignore
cli git gitignore go
Last synced: about 1 month ago
JSON representation
Generate gitignore templates in your teminal
- Host: GitHub
- URL: https://github.com/ddddami/gitignore
- Owner: ddddami
- License: mit
- Created: 2025-03-10T08:03:38.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-22T16:49:55.000Z (about 1 year ago)
- Last Synced: 2025-09-12T13:57:39.012Z (10 months ago)
- Topics: cli, git, gitignore, go
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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](https://github.com/ddddami/gitignore/releases). Extract the zip file, and run the executable, like;
```sh
cd gitignore && ./gitignore --help
```
You can add this to your PATH too.
```sh
# Linux/macOS
sudo mv gitignore /usr/local/bin/
```
### or From Source
1. Clone the repository:
```sh
git clone https://github.com/ddddami/gitignore
cd gitignore
```
2. Build the binary.
```sh
go build -o gitignore ./cmd/gitignore
```
3. Move the binary to your PATH
```sh
# Linux/macOS
sudo mv gitignore /usr/local/bin/
```
## Usage
```sh
gitignore [template-name]
```
For example:
```
gitignore node # Generates a Node.js .gitignore
gitignore python # Generates a Python .gitignore
gitignore python --dir="custom/dir"
```
Running `gitignore` without arguments will display available templates.
## Adding New Templates
This is a very simple tool, I added some templates from [github/gitignore](https://github.com/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]
- [x] Add support for adding templates to custom dirs
- [x] Add a flag to append to an existing .gitignore instead of creating/trying to create a new one
- [ ] Fetch templates remotely (from GitHub)