Skip to content

Instantly share code, notes, and snippets.

@EtienneDuv
Last active November 21, 2023 08:52
Show Gist options
  • Save EtienneDuv/c879a1cc7ea9150350fb015592c942be to your computer and use it in GitHub Desktop.
Save EtienneDuv/c879a1cc7ea9150350fb015592c942be to your computer and use it in GitHub Desktop.
.gitconfig
[alias]
b = branch
c = commit -m
s = switch
sc = switch -c
f = fetch --all
la = log --graph --decorate --pretty=oneline --abbrev-commit --all
l = log --pretty=format:'%Cred%h%Creset - %<|(60)%C(bold)%s%Creset %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
p = push
pf = push --force-with-lease
st = status -s
ccp = ! git branch --show-current | grep -oE '[[:alnum:]]+-[[:digit:]]+' | sed 's/$/ * []/' | xclip -selection clipboard -rmlastnl
bcp = ! git branch --show-current | xclip -selection clipboard -rmlastnl
pub = ! git push --set-upstream origin $(git branch --show-current)
rename = commit --amend -m
amend = commit --amend --no-edit
undo = reset --soft HEAD^
alias = ! git config --get-regexp ^alias\\. | sed -e s:^alias\\.:: -e s:\\ :\\\t\\ =\\ :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment