Last active
August 18, 2021 01:53
-
-
Save coderek/6ad62d47f560c09ce85b to your computer and use it in GitHub Desktop.
gitconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
fix = "!vim `git diff --name-only --diff-filter=U`" | |
co = checkout | |
l = log --decorate --graph --pretty='format:%C(auto)%h %s, %d%n🙇 %Cgreen%aN %Cred%ar (%aI)%n' --color --date-order | |
lg = log --pretty=oneline --abbrev-commit | |
la = log --all --date-order --decorate --graph --pretty='format:%C(auto)%h %s, %d%n🙇 %Cgreen%aN %Cred%ar (%aI)%n' --color | |
all = l --all --simplify-by-decoration | |
ba = "!f() { \ | |
git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' | sort -k5n -k2M -k3n -k4n; \ | |
}; f" | |
s = status | |
last = log -1 HEAD | |
b = branch | |
br = branch -r | |
cb = checkout -b | |
ss = stash save | |
sl = stash list | |
sa = stash apply | |
cp = cherry-pick | |
df = diff --cached | |
ps = push origin HEAD | |
f = fetch -a -p | |
cc = commit -n | |
contains = branch --contains | |
changed = diff develop --name-only | |
x = commit -a | |
ru = "!f() { \ | |
cur=`git branch --show-current`; \ | |
git reset --hard origin/$cur >/dev/null 2>&1; \ | |
}; f" | |
[user] | |
name = derek.zeng | |
email = | |
[core] | |
editor = vim | |
excludesfile = ~/.gitignore | |
autocrlf = input | |
[push] | |
default = simple | |
[color] | |
ui = auto | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto | |
ui = true | |
pager = true | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment