Skip to content

Instantly share code, notes, and snippets.

@leosuncin
Created November 7, 2022 01:53
Show Gist options
  • Save leosuncin/7fb12809933571729e9ff3f6f8837fd0 to your computer and use it in GitHub Desktop.
Save leosuncin/7fb12809933571729e9ff3f6f8837fd0 to your computer and use it in GitHub Desktop.
My git config
[push]
default = current
[alias]
last = log -1 --stat
pick = cherry-pick
co = checkout
cl = clone
ci = commit
st = status -sb
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
unstage = reset HEAD --
unchanged = update-index --assume-unchanged
changed = update-index --no-assume-unchanged
dc = diff --cached
dfs = !git diff --color --staged | diff-so-fancy | less --tabs=1,5 -RFX
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative --all
a = add --all
amend = commit --amend
fixup = commit --fixup
lab = repo lab
bb = repo bb
leaderboard = shortlog -sn
recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format=\"%(refname:short)\"
overview = log --all --oneline --no-merges
undo = reset HEAD~1 --mixed
wip = !git add -A && git commit -m 'wip: commit save not finished work' --no-verify
[help]
autocorrect = 1
[pull]
rebase = true
[gc]
autoDetach = false
[init]
defaultBranch = master
[rerere]
enabled = true
[rebase]
autoStash = true
[remote]
pushdefault = origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment