Often when I start a new project, I also need to have a .gitignore
for the specific language that I’m working in.
To easily do this, I added the following alias to my git, which pulls a template from gitignore.io:
git config --global alias.ignore \
'!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi'
Now you can do git ignore zig
and it will show you the default ignore file for a Zig project.
To automatically put it in your gitignore, just redirect the output:
git ignore zig >> .gitignore