All notes tagged with git.

December 27, 2022


A quick gitignore from a template

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

git config --global alias.ignore \
'!gi() { curl -sL$@ ;}; 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

November 20, 2022


Create a new repository with Github CLI

Github has their own CLI tool which enables you to interact with Github through the command line.

I often start new repositories and started using the following command to quickly create a accompanying, private repo on Github:

gh repo create <name> --private --source=. --remote=origin