Git Configuration

Here are some useful configuration options for Git. Some of them, like the Bash completion, are OS X specific but should also work if you adjust the paths according to your system of choice.

Install with MacPorts:

sudo port install git-core +svn +bash_completion

Bash completion:

cp /opt/local/etc/bash_completion.d/git ~/.git-bash-completion.sh
echo "[ -f ~/.git-bash-completion.sh ] && . ~/.git-bash-completion.sh" >> ~/.bash_profile
. ~/.bash_profile

Global ignore file:

echo ".DS_Store" >> ~/.gitignore
git config --global core.excludesfile ~/.gitignore

SVN-like shortcuts for often used commands:

git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch

Information about the author/commiter:

git config --global user.name "Your Name Comes Here"
git config --global user.email you@yourdomain.example.com

Colorized output:

git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto

TextMate as the default editor:

git config --global core.editor "mate -w"

Opendiff (FileMerge) to resolve merge conflicts:

git config --global merge.tool opendiff

Change the font in gitk: Open ~/.gitk and add:

set mainfont {Monaco 12}
set textfont {Monaco 12}
set uifont {Monaco 12}

Published: May 2, 2008 — Tagged:

Comments

Tate, June 18th, 2008

Thanks!

Post a Comment

© 2008 Arthur Koziel — About | Archive | Colophon | Contact | Feeds

Bookmarks Bookmarks RSS Feed

IEBlog : IE8 Security Part IV: The XSS Filter
IE8 will include and enable an XSS filter by default. To disable it, a custom HTTP header needs to be set.
YAXML
YAXML is a perl script which transforms YAML into XML and back.
Visual language 1.0
PDF describing the BBC.co.uk global page restructure.