Skip to content

Instantly share code, notes, and snippets.

@fbrnc
Last active June 14, 2016 17:01
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 fbrnc/5673574 to your computer and use it in GitHub Desktop.
Save fbrnc/5673574 to your computer and use it in GitHub Desktop.
Git Config
git config --global user.email "mail@address.com"
git config --global user.name "Fabrizio Branca"
git config --global color.ui auto
git config --global core.editor vi
git config --global alias.gm "merge --no-ff"
git config --global alias.st "status"
git config --global alias.s "status"
git config --global alias.p "push"
git config --global alias.d "diff"
git config --global alias.a "add"
git config --global alias.c "commit"
git config --global alias.co "commit"
git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit"
git config --global alias.rms "!f(){ git rm --cached \"$1\";rm -r \"$1\";git config -f .gitmodules --remove-section \"submodule.$1\";git config -f .git/config --remove-section \"submodule.$1\";git add .gitmodules; }; f"
# Remove submodule. See http://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule/17848164#17848164#answer-13185967
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment