Skip to content

Instantly share code, notes, and snippets.

@calvimor
Last active October 5, 2016 15:15
Show Gist options
  • Save calvimor/ff2315cf6fc156fce5c11ae07dc5c4a8 to your computer and use it in GitHub Desktop.
Save calvimor/ff2315cf6fc156fce5c11ae07dc5c4a8 to your computer and use it in GitHub Desktop.
Configuring git

Configuring Git

Global

git config --global user.name calvimor
git config --global user.email calvimor@gmail.com

git config --global core.editor vim|atom

git config --global core.autocrlf true|false|input

git config --global color.ui true

git config --global help.autocorrect 1|0

Local repo

First initialize a git repo, then you can set this configuration within git directory. You should do this setup when you need to use another values for this repository just

git config user.name "carlos villamizar"
git config user.email calvimor@me.com

Aliases

git config --global alias.st status
git config --global alias.br branch
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.l 'log --color --graph --pretty=oneline --decorate --date=short --abbrev-commit --branches'
git config --global alias.ds 'diff --stat'

Unset config values and aliases

git config unset <name.value>
git config unset --global <alias.abbr>
@calvimor
Copy link
Author

calvimor commented Oct 5, 2016

Some commads for setup your git ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment