Skip to content

Instantly share code, notes, and snippets.

@felipeeleuterio
Last active July 26, 2020 15:34
Show Gist options
  • Save felipeeleuterio/279367f7814ffd9f597687790e0cf064 to your computer and use it in GitHub Desktop.
Save felipeeleuterio/279367f7814ffd9f597687790e0cf064 to your computer and use it in GitHub Desktop.
.gitconfig
[alias]
adds = add .
ci = "!f() { git commit -m \"$*\"; }; f"
co = checkout
cm = checkout master
cb = checkout -b
cr = "!f() { git checkout -b \"$*\" origin/\"$*\"; }; f"
fire = "!f() { $(git adds) && $(git ci $@) && $(git ps); }; f"
firein = "!f() { git add -A && git commit -m \"$*\" && git push; }; f"
st = status -sb
sf = show --name-only
pl = !git pull origin $(git symbolic-ref --short HEAD)
ps = !git push origin $(git symbolic-ref --short HEAD)
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=24
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
unstage = reset HEAD --
undo = "!f() { git checkout -- $@; echo done!; }; f"
rollback = "!f() { git reset --soft HEAD~1; echo done!; }; f"
graph = log --no-decorate --graph --oneline
untrack = clean -f
race = shortlog -sn --since=\"01 Jan 20\"
delete = branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment