Skip to content

Instantly share code, notes, and snippets.

@Nilpo Nilpo/git-setup.sh
Last active Nov 3, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.