Member-only story
10 Git Aliases I Type Every Day
I watched a colleague squint at their terminal last week, typing git log --oneline --decorate --graph --all from memory. Took them four tries to get it right.
I do not judge. I was that person too.
At some point a few years ago I sat down and wrote down every git command I ran more than twice a week. Then I aliased them. What I have now is something between muscle memory and a cheat sheet baked into the shell. Here are the ones I still use.
1. git lg: the log you actually want to read
git config --global alias.lg "log --oneline --decorate --graph --all --date=relative"git log out of the box is almost unreadable. Long hashes, no graph, dates that require math. git lg gives me a visual branch graph with relative dates and short hashes in one line. I run this probably 15 times a day.
The alternative is something like git-graph if you want an even fancier output. But for something that lives in plain git config, lg is enough.
2. git st: because four letters is three too many
git config --global alias.st "status -s"Short status. Same information, half the noise. The -s flag gives you two-character status codes per file instead of…
