Created
August 23, 2011 13:37
-
-
Save steder/1165138 to your computer and use it in GitHub Desktop.
Git setup niceties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# via https://gist.github.com/419201#file_gitconfig.bash | |
# Install (from Matt's gist) these useful Git aliases & configurations with the following command: | |
# $ bash <(curl -s https://raw.github.com/gist/419201/gitconfig.bash) | |
git config --global color.ui auto # colorize output (Git 1.5.5 or later) | |
git config --global color.interactive auto # and from 1.5.4 onwards, this will works: | |
echo "Set your name & email to be added to your commits." | |
echo -n "Please enter your name: " | |
read git_name | |
echo -n "Please enter your email: " | |
read git_email | |
git config --global user.name "$git_name" | |
git config --global user.email "$git_email" | |
unset git_name | |
unset git_email | |
git config --global core.excludesfile ~/.gitignore | |
git config --global rerere.enabled 1 | |
git config --global branch.master.remote origin | |
git config --global branch.master.merge refs/heads/master | |
git config --global alias.br branch | |
git config --global alias.ci "commit -a" | |
git config --global alias.co checkout | |
git config --global alias.df diff | |
git config --global alias.dwc "diff -w -M --color-words" | |
git config --global alias.lg log | |
git config --global alias.ll "log -p" | |
git config --global alias.rb rebase | |
git config --global alias.fix "rebase -i origin/master" | |
git config --global alias.rbc "rebase --continue" | |
git config --global alias.re remote | |
git config --global alias.st status | |
git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit" | |
git config --global alias.up "pull --rebase" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment