Skip to content

Instantly share code, notes, and snippets.

@ryansobol
Last active November 1, 2016 13:26
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 ryansobol/b6a86657c1cf8707b108 to your computer and use it in GitHub Desktop.
Save ryansobol/b6a86657c1cf8707b108 to your computer and use it in GitHub Desktop.
git config --global alias.c 'commit -m'
git config --global alias.st 'status --short --branch'
git config --global alias.ca 'commit --amend --reuse-message=HEAD'
git config --global alias.co 'checkout'
git config --global alias.br 'branch'
git config --global alias.df 'diff HEAD'
git config --global alias.ir $'!sh -c \'git rebase --interactive ${1-master}\' -'
git config --global alias.ll 'log --graph --all --pretty=format:"%Cred%h %>(11,trunc)%Cgreen%cr %<(10,trunc)%Cblue%cn%C(yellow)%d %Creset%s"'
git config --global alias.la 'log --patch --stat --pretty=format:"%C(bold red)%h %Cgreen%cr %Cblue%cn%C(yellow)%d %Creset%s"'
git config --global alias.dfs 'diff --staged'
git config --global alias.done $'!sh -c \'git checkout ${2-master} && git merge @{-1} && git push ${1-origin} ${2-master}\' -'
git config --global alias.sync $'!sh -c \'git checkout ${2-master} && git pull ${1-origin} ${2-master} && git checkout @{-1} && git rebase ${2-master}\' -'
git config --global alias.unadd 'reset HEAD --'
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.branch.upstream 'cyan'
git config --global color.diff.frag 'magenta bold'
git config --global color.diff.func 'normal bold'
git config --global color.diff.meta 'yellow bold'
git config --global color.diff.new 'green bold'
git config --global color.diff.old 'red bold'
git config --global color.status.added 'green bold'
git config --global color.status.branch 'yellow'
git config --global color.status.changed 'yellow bold'
git config --global color.status.untracked 'cyan bold'
git config --global push.default simple
git config --global credential.helper osxkeychain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment