Skip to content

Instantly share code, notes, and snippets.

@randomecho
Last active April 2, 2019 15:53
Show Gist options
  • Save randomecho/845e1af4d57ba6cb3c78456ebc9f9855 to your computer and use it in GitHub Desktop.
Save randomecho/845e1af4d57ba6cb3c78456ebc9f9855 to your computer and use it in GitHub Desktop.
Git aliases
[alias]
soonvan = commit -m \"Created by Soon Van - randomecho.com\"
purple = commit -am \"purple monkey dishwasher\"
hist = log --pretty=format:\"%h %ad | %s%d\" --graph --date=short
histo = log --max-count=12 --pretty=format:\"%h %ad %s%d\" --graph --date=short
search = !sh -c 'git log --max-count=12 --grep=$1 --pretty=format:\"%h%C(bold yellow) %s%C(reset)\"' -
undo = reset --soft HEAD~
edit = commit --amend
twt = !git add twitter.txt
waxy = !git add wax* && git s
jump = !git fetch zero && git rebase zero/master
devo = !git fetch zero && git rebase zero/develop
devom = !git fetch zero && git rebase zero/development
hump = !git fetch zero && git rebase zero/gh-pages
localhost = commit -am \"set up configuration for local development\"
flat = commit -am \"tidy formatting, whitespace and dead comments\"
reuse = !sh -c 'git log --format=%s -n1 $1 | git commit -F -' -
whatnow = !sh -c 'git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $1 > /w/logs/git' -
whatup = !sh -c 'git whatchanged --reverse --pretty=format:%n%s --name-only -$1 > /w/logs/git' -
sub = !sh -c 'git log --reverse --pretty=format:%s -$1 > /w/logs/git' -
sup = !sh -c 'git whatchanged --pretty=format:%h-%s --name-only -1 > /w/logs/git' -
whatfiles = !sh -c 'git whatchanged --pretty=format:%n --name-only -$1 > /w/logs/git' -
whatcomm = !sh -c 'git log --graph --all --format=format:%s --abbrev-commit -$1 > /w/logs/git' -
d = diff
c = diff --cached
statchange = diff --stat
statready = diff --cached --stat
patch = add -p .
s = status -s
ss = status
sos = status --untracked-files=no
tog = log --graph --all --format=format:'%C(bold blue)%h%C(reset) %C(bold green)%ar%C(reset) %s' --abbrev-commit --date=relative
ll = log --graph --all --format=format:'%C(bold blue)%h%C(reset) %C(bold green)%ar%C(reset) %s %C(magenta)%d%C(reset)' --abbrev-commit --date=relative
[core]
autocrlf = false
[color "status"]
changed = bold yellow
untracked = bold cyan
added = bold green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment