Skip to content

Instantly share code, notes, and snippets.

@loslch
Forked from rakyll/gist:452e2e748a2a990ed5b8838861eafc12
Last active April 3, 2018 01:08
Show Gist options
  • Save loslch/b5f152ce11b5332ba716a7a7326328cb to your computer and use it in GitHub Desktop.
Save loslch/b5f152ce11b5332ba716a7a7326328cb to your computer and use it in GitHub Desktop.
useful git alias
s = status --short --branch --ignore-submodules=untracked
find = log --pretty=\"format:%Cgreen%H\n%s\n\n%b\" --name-status --grep
amend = commit --amend --no-edit
undo = reset HEAD~
upload = "!git push rakyll $(git rev-parse --abbrev-ref HEAD)"
prune = "!git co master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
delete = branch -D
pr = "!git fetch origin pull/$1/head:pr$1"
sync = "!git pull -q -r origin master"
co = checkout
rb = rebase -i
st = status
cm = commit
pl = pull
ps = push
lg = log --graph --abbrev-commit --decorate --format=format:'%C(cyan)%h%C(reset) - %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(yellow)%d%C(reset)' --all
ad = add
tg = tag -n
df = diff
br = branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment