Skip to content

Instantly share code, notes, and snippets.

@amacfie
Forked from 3v1n0/.gitconfig
Created July 28, 2017 16:11
Show Gist options
  • Save amacfie/6ed806e4ccdaaedbe86c12ce1f0f28aa to your computer and use it in GitHub Desktop.
Save amacfie/6ed806e4ccdaaedbe86c12ce1f0f28aa to your computer and use it in GitHub Desktop.
git-human-aliases
[alias]
added = diff --cached
br = branch
ci = commit
co = checkout
contains = branch --contains
di = diff
diffc = diff --cached
discard = checkout --
distclean = "clean -dxfi"
exec = "!exec "
files = log --pretty='format:%h - %ad' --name-status --relative-date
fixup = commit --all --amend --reuse-message=HEAD
follow = log --follow --patch-with-stat --ignore-all-space --
graph-pretty = log --all --graph --pretty --oneline --decorate
graph = log --graph --pretty=format:'%Cred%h%Creset-%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%Creset' --abbrev-commit --date=relative --all
glog = log --graph --decorate=full
last = log -1 HEAD
last-ten = log -n 10 --first-parent --oneline
logall = log --branches=*
restore = "checkout --"
revert = "checkout --"
revno = !git rev-list --all | wc -l
rmmerged = "!git branch --merged | grep --verbose '\\*\\|master\\|develop' | xargs -n 1 git branch -d"
showtag = show-ref
smerge = "merge --no-ff --no-commit"
st = status
stat = status
tip = rev-parse --verify HEAD
unadd = reset HEAD --
uncommit = "!bash -c 'echo "Uncommittng: " && git rev-list --format=%B --max-count=1 HEAD && read -p "[Y/N] " -N 1 reply && ([ "$reply" == "Y" ] || [ "$reply" == "y" ]) && echo && git reset --soft HEAD^'"
uncommit-quick = reset --soft HEAD^
undo = git revert --strategy resolve
unstage = reset HEAD --
vis = !gitg
visual = !gitg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment