Skip to content

Instantly share code, notes, and snippets.

@Ohcanep
Last active September 7, 2016 15:31
Show Gist options
  • Select an option

  • Save Ohcanep/b4eb2f23b983f3d8814a11f3451b8b47 to your computer and use it in GitHub Desktop.

Select an option

Save Ohcanep/b4eb2f23b983f3d8814a11f3451b8b47 to your computer and use it in GitHub Desktop.
[alias]
b = branch -vv
ba = branch -avv
c = commit
ca = commit --amend
can = !git commit --amend --date="$(date +%Y-%m-%dT%H:%M:%S%z)"
co = checkout
com = checkout master
ds = diff --stat-name-width=50
dw = diff --word-diff=color
find = !git ls-files | grep -Ei
fu = fetch upstream
last = log --pretty=lf --stat-name-width=50 -n 1
lf = log --pretty=lf --no-merges --stat-name-width=50
lg = log --pretty=lg --date=short --graph
lm = log --pretty=lm --stat-count=8 --stat-name-width=50
lq = "!f () { git log --pretty=lq $@ | grep -v '^$' | less -FRSX; }; f"
lsre = remote -v
prune-all = !git remote | xargs -n 1 git remote prune
purge = !git ls-files -dz | xargs -0 git rm
s = status -bs
this = !git init && git add . && git commit -m 'Initial commit'
undo = reset --soft HEAD^
unstage = reset HEAD --
utc-commit = !git commit --date="$(date --utc +%Y-%m-%dT%H:%M:%S%z)"
[color]
ui = auto
[core]
editor = nano
pager = less -S
[log]
date = iso
[pretty]
lf = format:"%n%G? %C(yellow)%h (%p)%C(auto)%d %C(red)%GS%n%C(cyan)%ai %C(green)%an%n%C(cyan)%ci %C(green)%cn%n%n%s%n%+b"
lg = tformat:"%C(yellow)%h %C(cyan)%ad %C(reset)%<(50,trunc)%s %C(green)%an%C(auto)%d"
lm = format:"%G? %C(yellow)%h (%p)%C(auto)%d %C(red)%GS%n%C(cyan)%ai %C(green)%an%n%C(cyan)%ci %C(green)%cn%n%n%s%n"
lq = tformat:"%C(auto)%+d%n%C(yellow)%h %C(cyan)%ai %C(reset)%<(64,trunc)%s %C(green)%an"
[push]
default = current
[include]
path = ~/.config/git/user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment