Skip to content

Instantly share code, notes, and snippets.

@martinlemahieu
Last active September 14, 2023 10:46
Show Gist options
  • Save martinlemahieu/229817b51e91847009fd to your computer and use it in GitHub Desktop.
Save martinlemahieu/229817b51e91847009fd to your computer and use it in GitHub Desktop.
git config
[alias]
# shortcuts
a = add
s = status -s
st = status
cm = commit -m
co = checkout
cob = checkout -b
br = branch
brm = branch --merged
ft = fetch
rb = rebase
rbi = rebase -i
ps = push
pl = pull
# logs
la = "!git config -l | grep alias | cut -c 7-"
l = log --oneline --decorate
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate --numstat
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate --date=short
ldr = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate --date=relative
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
filelog = log -u
fl = log -u
[push]
default = simple
[credential]
helper = store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment