Git is wonderful and easy to use. Most of the commands are pretty short and do not require a lot of typing. However some programmers, including me, are pretty lazy and if it saves me few keystrokes I prefer to type less to achieve the same results. Enter bash aliases. It is possible to specify any command and assign it to something short.
Here is a little guide on how to do it.
- In your bash shell type
- In the opened file you can configure your aliases like shown below
Most of aliases in the list above are self explanatory. The
& symbol at the end of
gg means that command will run in background.
If this command is not specified the shell will wait until window is closed before new command can be typed in.
The last alias
gl shows example why bash alias can be really useful. If you execute
git log command in bash you will be presented with scrolling log.
That might be what you want but I prefer condensed and easy to read output that command behind
gl alias produces.