/ Published in: Bash
Setup default ignores, aliases, colors, completion and bash prompt in Git
These are to be run from Terminal.
These are to be run from Terminal.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# 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 your_email@your-domain.com # 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
URL: http://subtlegradient.com/articles/2008/02/21/install_git_leopard