Return to Snippet

Revision: 19613
at October 27, 2009 09:25 by alvarezrilla


Updated Code
# Ignore Crap
git config --global core.excludesfile ~/.gitignore
touch               "$HOME/.gitignore"
echo '.DS_Store' >> "$HOME/.gitignore"
echo '._*'       >> "$HOME/.gitignore"
echo '.svn'      >> "$HOME/.gitignore"
echo '.hg'       >> "$HOME/.gitignore"

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

# Colors? YES!
git config --global color.ui auto

# Personal Setup
git config --global user.name "Your Name"
git config --global user.email [email protected]

# Setup Bash Completion
mkdir -p "$HOME/bin"
export PATH="$HOME/bin:$PATH"
echo 'export PATH="$HOME/bin:$PATH"'               >> ~/.bash_profile
cp "$HOME/Downloads/src/git-$GIT_VERSION/contrib/completion/git-completion.bash" ~/bin
echo 'source ~/bin/git-completion.bash'            >> ~/.bash_profile

# Add the current Git Branch to your Bash Prompt
echo "PS1='[\u@\h \w\$(__git_ps1 \" (%s)\")]\\$ '" >> ~/.bash_profile

Revision: 19612
at October 27, 2009 09:24 by alvarezrilla


Initial Code
# Ignore Carp
git config --global core.excludesfile ~/.gitignore
touch               "$HOME/.gitignore"
echo '.DS_Store' >> "$HOME/.gitignore"
echo '._*'       >> "$HOME/.gitignore"
echo '.svn'      >> "$HOME/.gitignore"
echo '.hg'       >> "$HOME/.gitignore"

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

# Colors? YES!
git config --global color.ui auto

# Personal Setup
git config --global user.name "Your Name"
git config --global user.email [email protected]

# Setup Bash Completion
mkdir -p "$HOME/bin"
export PATH="$HOME/bin:$PATH"
echo 'export PATH="$HOME/bin:$PATH"'               >> ~/.bash_profile
cp "$HOME/Downloads/src/git-$GIT_VERSION/contrib/completion/git-completion.bash" ~/bin
echo 'source ~/bin/git-completion.bash'            >> ~/.bash_profile

# Add the current Git Branch to your Bash Prompt
echo "PS1='[\u@\h \w\$(__git_ps1 \" (%s)\")]\\$ '" >> ~/.bash_profile

Initial URL
http://subtlegradient.com/articles/2008/02/21/install_git_leopard

Initial Description
Setup default ignores, aliases, colors, completion and bash prompt in Git
These are to be run from Terminal.

Initial Title
Add fancy stuff to your Git prompt

Initial Tags
linux, color, git

Initial Language
Bash