Skip to content

Instantly share code, notes, and snippets.

@kljensen
Created June 28, 2012 19:55
Show Gist options
  • Save kljensen/3013491 to your computer and use it in GitHub Desktop.
Save kljensen/3013491 to your computer and use it in GitHub Desktop.
Open GitX from the command line
GITX="/Applications/GitX.app/Contents/Resources/gitx"
if [[ -x $GITX ]]; then
gitx() {
if [[ ($# -eq 1) && ($1 != "-"*) ]]; then
# If a single arg is given, assume that
# arg is the directory to open.
$GITX --git-dir=$1
else
# Otherwise pass args to gitx.
$GITX "$@"
fi
}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment