5 Comments

git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit"s

^ extra s at the end :)

Expand full comment

Thanks, I’ll fix it!

Expand full comment

cool.

I never relied on git aliases. But I think they might be helpful in certain cases when you have many flags on frequently used commands.

Not an alias. But 'git add -i' for interactive staging is probably the most powerful command that I often use. Also git bisect for debugging.

Expand full comment

> git config --global alias.last "log -1 HEAD"

I don't see the benefit of aliasing it. You could "git log" and save typing an extra character.

Expand full comment

Thanks for pointing this out! Indeed, this alias is not useful. It comes from an old version of the article, and I forgot to change it (and the screenshot) to:

git config --global alias.last '!git --no-pager log -1 HEAD'

This saves you from typing :q, as it just prints the last commit without using a pager. I've updated the alias in the article.

Expand full comment