Skip to content

Instantly share code, notes, and snippets.

@cdwilson
Created December 14, 2010 20:19
Show Gist options
  • Save cdwilson/741020 to your computer and use it in GitHub Desktop.
Save cdwilson/741020 to your computer and use it in GitHub Desktop.
Git setup script for ubuntu
#!/bin/sh
# Install meld
sudo apt-get -y install meld
# Install lighttpd so that 'git instaweb' works
# sudo apt-get -y install lighttpd
# Install git
sudo apt-get -y install git-core git-doc git-cvs git-svn git-email git-daemon-run git-gui gitk
# User
git config --global user.name "Christopher Wilson"
git config --global user.email "cwilson@cdwilson.us"
# Editor
git config --global core.editor gedit
# 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 alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
# http://progit.org/book/ch6-3.html
git config --global alias.stash-unapply '!git stash show -p | git apply -R'
# if you ever have conflicts you can type git-mergetool
# to use meld for resolving conflicts
git config --global merge.tool meld
# Whenever we merge provide a summary of commits
git config --global merge.summary true
# Use 'git difftool'
git config --global diff.tool meld
# globally ignore some cruft files
git config --global core.excludesfile ~/.gitignore
echo "*~" >~/.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment