Skip to content. | Skip to navigation

Sections
Personal tools
What is this?
Hi, my name is Tom Lazar and I'm a Plone and Zope developer based in Berlin, Germany and this is my personal and professional (no big difference, really...) website.
 

subversion

Jan 12, 2009

Git command aliases

Filed Under:

Not everything in svn is worse than in git!

One of the nice features of subversion are its built-in command aliases, i.e. instead of having to type svn commit you can just use svn ci, instead of propertyedit just type pe.

git doesn't have those, which some find annoying. However, you can easily remedy this by adding an [alias] section to your ~/.gitconfig file. Upon request and because it's really a nice feature here's an example for that from my own configuration. I've copied it myself mostly from Andi, who is as much more prolific than I as he is lazier to blog ;-)

Anyway, here it goes:

[core]
    excludesfile = /Users/tomster/.gitignore
    pager = "/opt/local/bin/less -RciqMSj5"
    editor = mate -w

[color]
    diff = auto
    branch = auto
    status = auto

[diff]
    renames = true

[alias]
    st = status
    d = diff
    ci = commit -v
    cia = commit -v -a
    co = checkout
    cp = cherry-pick
    l = log
    ll = log -p
    lt = log trunk..
    llt = log -p trunk..
    lm = log master..
    llm = log -p master..
    b = branch

The .gitignore file referenced above looks like this (and should look rather familiar to svn users):

.svn
*.egg-info
*.pyc
.DS_Store
tmtags

Update: @philikon found the FM :-)