Git

Working with git? These aliases will save your time

I used to type all git commands in full like git status, git add, git push, git checkout, git branch, and a lot more. Oh! today I was fed up of typing these commands again and again! huh.

So? I got a cool idea. How about creating Huffman coded aliases for most of the git commands I use.

Instead of typing git status, now I type git st, instead of typing git add, now I type git a. Isn’t it cool? 🙂

You should use it too, if you were sailing in the same boat with me.

Here are the aliases that I now started using:


alias git st='git status'

alias git ph='git push'

alias git l='git log'

alias git a='git add'

alias git cl='git clone'

alias git d='git diff'

alias git dc='git diff --cached'

alias git m='git commit -m'

alias git b='git branch'

alias git c='git checkout'

alias git pu='git pull'

 

How and Where to add them?

add lines to ~/.gitconfig. You can find this file in your home directory, if not create it.


[alias]

st = status

 

 

and you’re done. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s