Skip to content

Instantly share code, notes, and snippets.

@yingzwang
Last active April 14, 2023 18:38
Show Gist options
  • Save yingzwang/49a211b8e8e3ed7ea5a3fdc3aae916ec to your computer and use it in GitHub Desktop.
Save yingzwang/49a211b8e8e3ed7ea5a3fdc3aae916ec to your computer and use it in GitHub Desktop.
gitconfig
[pretty]
my-oneline = format:%C(auto,yellow)%h %C(auto,blue)%<(10,trunc)%ad %C(auto,green)%<(8,trunc)%aN %C(auto,reset)%s %C(auto,red)%gd%d
[alias]
a = add
ai = add -i
au = add -u
b = branch
bd = branch -d
bdd = branch -D
cm = commit -m
cd = commit --amend
d = diff
dc = diff --cached
l = !sh -c 'git log -$1 --oneline' -
ll = log --pretty=my-oneline --date=short
o = checkout
ob = checkout -b
r = remote
s = status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment