Skip to content

Instantly share code, notes, and snippets.

@bserem
Created April 30, 2014 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bserem/c3211007e9f12c7e9d45 to your computer and use it in GitHub Desktop.
Save bserem/c3211007e9f12c7e9d45 to your computer and use it in GitHub Desktop.
Automatically configure git on a new environment
#!/bin/bash
# Automagically config git with a proper set of settings.
# Update and uncomment the following lines to change your user.
#git config --global user.name=""
#git config --global user.email=""
git config --global core.editor vim
git config --global core.page more
git config --global help.autocorrect 1
git config --global color.ui true
git config --global diff.tool vimdiff
# aliases
git config --global alias.l 'log'
git config --global alias.st status
git config --global alias.br 'branch -v'
git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
git config --global alias.type 'cat-file -t'
git config --global alias.dump 'cat-file -p'
git config --global alias.d difftool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment