Type less, develop faster. All through the power of git aliases
git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit"s
^ extra s at the end :)
Thanks, I’ll fix it!
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.
> 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.
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.
git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit"s
^ extra s at the end :)
Thanks, I’ll fix it!
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.
> 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.
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.