Skip to content

Instantly share code, notes, and snippets.

@luckyyang
Last active December 19, 2015 23:28
Show Gist options
  • Save luckyyang/6034718 to your computer and use it in GitHub Desktop.
Save luckyyang/6034718 to your computer and use it in GitHub Desktop.
my .gitconfig
[user]
name = Liu Jiyang
email = 2411mail@gmail.com
[core]
editor = vim
[push]
default = current
[branch]
autosetuprebase = always
[color]
ui = true
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta bold
old = red
new = cyan
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
ci = commit -v
br = branch
co = checkout
st = status
throw = reset --hard HEAD
throwh = reset --hard HEAD^
# shows list of files that have a merge conflict
conflicts = diff --name-only --diff-filter=U
changes = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# unstages a file. use like 'git unstage filename'
unstage = reset HEAD --
# resets all uncomitted changes and files
abort = reset --hard HEAD
# shows diff only for files staged to commit
new = diff --cached
# shows only changes to files in current directory
here = status .
# undo last commit
undo = reset HEAD~1
# change last commit message
recommit = commit --amend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment