Creating your own git aliases based on your needs

Flattr this
Tweet this: Creating your own git aliases based on your needs
Dent this: Creating your own git aliases based on your needs
Tags: bash, Git, git alias, zsh
Datum: 19.12.2010 11:56:31

If you want to create git aliases optimized for your daily work, you should start by analysing your shell logs to find out which git commands you use most of the time and create shortcuts for them:

bash:

 
cat .bash_history  | egrep -i "^git" | sort | uniq -c | sort -n

zsh with extended history (including timestamps) using fc instead of cat.

fc -ln 0 | egrep -i "^git" | sort | uniq -c | sort -n  

sample output:

     31 git checkout master
     41 git submodule foreach "git push origin master"
     59 git submodule foreach "git pull origin master"
    265 git submodule foreach "git gui &"
    358 git status -s
    979 git gui &

Now you can start to write your own aliases for everything and optimize you daily workflow. My aliases can be found here: Git, Aliases, Submodules and Symfony


Trackbacks (0)

Trackbackurl: http://www.robo47.net/trackback/blogentry/209

Es sind keine Trackbacks vorhanden.


Kommentare (0)

Es sind noch keine Kommentare vorhanden.

Die Kommentare zu diesem Beitrag sind gesperrt.

You liked it ? Link it on your homepage or blog: