Skip to content

Instantly share code, notes, and snippets.

@bnguyensn
Created May 11, 2020 08:28
Show Gist options
  • Save bnguyensn/bf15e8b712fac30e45062251cf9bfc70 to your computer and use it in GitHub Desktop.
Save bnguyensn/bf15e8b712fac30e45062251cf9bfc70 to your computer and use it in GitHub Desktop.
Example .gitconfig
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
[user]
name = Binh Nguyen
[user]
email = [email protected]
[winUpdater]
recentlySeenVersion = 2.25.0.windows.1
[push]
default = tracking
[alias]
st = status
aa = add .
ca = "!git add . && git commit"
c = commit
cm = commit -m
# list branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
co = checkout
cb = checkout -b
bd = branch -d
bD = branch -D
pu = push -u origin HEAD
p = push origin HEAD
rpo = remote prune origin
# Logging
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment