User Tools

Site Tools


Table of Contents



brew install git # Originally installed from
# MAYBE: git-extras git-flow git-hg git-multipush git-sh git-ssh git-subtree git-utils
brew install tig


# you
FULL_NAME=$(dscl . -read $HOME RealName | tail -1 | perl -pe 'chop')
git config --global "$FULL_NAME"
git config --global ""
# colors
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
git config --global color.interactive auto
# shortcuts
git config --global status
git config --global alias.di diff
git config --global branch
git config --global commit
git config --global checkout
git config --global commit
# if you ever have conflicts you can type git-mergetool
# to use Apple opendiff (FileMerge) for resolving conflicts
git config --global merge.tool opendiff
# Whenever we merge provide a summary of commits
git config --global merge.summary true
# globally ignore some cruft files
git config --global core.excludesfile ~/.gitignore
echo "*~" >>~/.gitignore
echo ".DS_Store" >>~/.gitignore
# Add bash completion for git command.
ln -s /usr/local/git/contrib/completion/git-completion.bash /Users/booch/bin/bash_completion.d/git
# TODO: bash prompt.
export PS1='$(git branch &>/dev/null; if [ $? -eq 0 ]; then \
echo "\[\033[00m\]$(git branch | grep ^*|sed s/\*\ //) "; fi)\$\[\033[00m\] '
mac/git.txt · Last modified: 2013/10/26 13:51 by Craig Buchek