goignore
is a lightweight Command Line Interface (CLI) tool for generating .gitignore
files based on the programming language you're using. It helps you easily create .gitignore
files for your projects by either specifying a programming language or automatically detecting it from the files in your project directory.
To use goignore
, you need to have Go (Golang) installed on your system. If you haven't installed Go, you can download and install it from the official website.
Once you have Go installed, you can install goignore
using the following command:
go install github.com/hacktivist123/goignore/cmd/goignore
Go pkg:
go get -u github.com/hacktivist123/goignore/cmd/goignore
Clone repo to your local directory with the command
git clone https://github.com/hacktivist123/goignore.git
Get the executable goignore file by running the command
go build ./goignore/cmd/goignore
A goignore executable file should be generated for you, you can run all the commands outlined above but this time prepend it with ./
.
Example:
./goingore list
You can find the official Docker image here
If you want goignore to automatically detect the programming language based on the files in your project directory, you can run the following command:
goignore new
To generate a .gitignore file for a specific programming language, you can use the following command:
goignore new --language=<language>
Replace with the desired programming language. For example, to generate a .gitignore file for Python:
goignore new --language=python
You can also use the -l shorthand for the --language flag.
If you want a gitignore file and a new git repository at the same time, you can do this by running the following command
gitignore new --init
You can also use the -i shorthand for the --init flag.
To list all supported programming languages for generating .gitignore files, you can use the following command:
goignore list
This will display a list of supported programming languages.
-
Interactive mode
-
Allow users to choose to initialize the git repo in their folder
-
Use
goignore new
to auto-detect language and scrapgoignore new language=auto
-
Github actions to build main.go file and automatically create an executable file that can be downloaded
-
Unit tests for all functions (should be part of GitHub actions workflow)
-
Other installation options i.e brew, scoop and npm
-
Setup GoReleaser
Contributions to goignore are welcome! If you encounter any issues, have suggestions, or want to contribute improvements, please open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License.