Created
June 28, 2012 19:55
-
-
Save kljensen/3013491 to your computer and use it in GitHub Desktop.
Open GitX from the command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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