Skip to content

Instantly share code, notes, and snippets.

@Nilpo
Last active November 3, 2018 08:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nilpo/214ac75492285c0cd1fe2b8c20f28c0d to your computer and use it in GitHub Desktop.
Save Nilpo/214ac75492285c0cd1fe2b8c20f28c0d to your computer and use it in GitHub Desktop.
Set up a friendly Git environment
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
git config --global alias.prune 'fetch --prune'
git config --global alias.undo 'reset --soft HEAD^'
git config --global alias.stash-all 'stash save --include-untracked'
git config --global alias.glog "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s%Cgreen(%cr) %C(bold blue)<%an%>%Creset'"
git config --global merge.ff only
git config --global merge.conflictstyle diff3
git config --global commit.gpgSign true
git config --global push.default simple
git config --global push.followTags true
git config --global status.showUntrackedFiles all
git config --global apply.whitespace nowarn
git config --global color.ui auto
git config --global color.branch auto
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch.current 'yellow reverse'
git config --global color.branch.local yellow
git config --global color.branch.remote green
git config --global color.diff.meta 'yellow bold'
git config --global color.diff.frag 'magenta bold'
git config --global color.diff.old 'red bold'
git config --global color.diff.new 'green bold'
git config --global color.status.added yellow
git config --global color.status.changed green
git config --global color.status.untracked cyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment