003 - How to set aliases for GIT commands? | GIT Tips & Tricks
There is a way to set aliases for git commands as well so that you don't need to remember commonly used long commands. You could either add via terminal or edit ~/.gitconfig file. For example, in order to see last log I simply run git last after adding this as an alias git config --global alias.last 'log -1 HEAD' You can even make an alias "g" for "git" in your ~/.bashrc file so that you could use "g" instead of typing "git" all the times
There is a way to set aliases for git commands as well so that you don't need to remember commonly used long commands. You could either add via terminal or edit ~/.gitconfig file. For example, in order to see last log I simply run git last after adding this as an alias git config --global alias.last 'log -1 HEAD' You can even make an alias "g" for "git" in your ~/.bashrc file so that you could use "g" instead of typing "git" all the times