git

The Five Ws of a Git Commit

Your commit history is not for you, at least not for you of right now. You of right now are full of context and understanding that despite how much we may convince ourselves that we’ll remember with perfect clarity tomorrow, I rarely find that to be the case. To solve this problem it’s important to approach our commit history like a story.

Change the default git branch

First we’ll need to rename the old branch to the new branch. For this we’ll be renaming the master branch to main.

Branch Agnostic Git Aliases

Github and others have recently changed the name of the default branch in git from master to main, you can read more about the change here. If you are like me you likely had a few git aliases that were hard coded to assume the default branch in a repository was master, however there is a better way of writing git aliases that will work no matter what the default is set to.

Signing Git Commits With Keybase

Signing your commits is a good practice that applies your John Hancock to your work so that others can verify that it was really you made the change, plus you get a cool Verified badge on GitHub and who doesn’t like badges. Managing private keys can be a tricky process but fortunately keybase greatly simplifies this and allows us to easily share keys between different machines.