Skip to content

Instantly share code, notes, and snippets.

@contivero
Last active December 2, 2019 14:42
Show Gist options
  • Save contivero/7d48b7e293f7c78ee94e5fd30fe7587f to your computer and use it in GitHub Desktop.
Save contivero/7d48b7e293f7c78ee94e5fd30fe7587f to your computer and use it in GitHub Desktop.
[user]
email = [email protected]
name = Cristian A. Ontivero
[alias]
# Get current branch name (used in other aliases)
branch-name = rev-parse --abbrev-ref HEAD
# Undo commit
uc = reset --soft HEAD~1
tree = log --graph --full-history --all --color --pretty=format:\"%C(yellow)%h%C(reset)%x09%C(cyan)%<(25)%an%C(reset)%s%C(bold red)%d%C(reset) %C(blue)%ad%C(reset)\" --relative-date --decorate
s = status --short --branch
down = pull --rebase origin master
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
sl = stash list --pretty=format:'%Cblue%gd%Cred: %C(yellow)%s'q
# Push to remote
pr = push origin $(git branch-name)
# Delete from remote
dr = push origin :$(git branch-name)
# history
h = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
[core]
pager = less -x1,5
editor = vim
compression = 9
[pack]
useSparse = true
[pull]
rebase = true
[merge]
conflictstyle = diff3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment