Last active
September 30, 2015 03:18
-
-
Save devth/1713016 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status -sb | |
ci = commit | |
co = checkout | |
br = branch | |
sb = show-branch | |
dt = difftool | |
pu = push | |
cia = commit -a --amend | |
branch-name = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD` | |
desc = !git config branch.`git branch-name`.description | |
# log variations | |
hist = log --pretty=format:\"%h %Cgreen%ad%Creset %s%d [%an]\" --graph --date=short | |
hi = !git hist --since=1.week.ago | |
h = !git hi | |
week = !git hi | |
today = !git hist --since=1.day.ago | |
last = !git --no-pager hi -n1 | |
tree = log --oneline --decorate --graph | |
cp = cherry-pick | |
a = add -A | |
# since master | |
sm = log master.. --pretty=oneline --graph --date=short --abbrev-commit | |
# tags sorted by date | |
t = for-each-ref --sort='*authordate' --format='%(tag)' refs/tags | |
# git svn | |
sr = svn rebase | |
sd = svn dcommit | |
# short logs | |
h1 = !git hi -1 | |
h2 = !git hi -2 | |
h3 = !git hi -3 | |
h4 = !git hi -4 | |
h5 = !git hi -5 | |
l1 = log --pretty=oneline | |
ls = !git hi --stat | |
lg = log --graph | |
root = !pwd | |
tracks = !sh -c 'git rev-parse --verify "${1:-HEAD}@{upstream}" 2> /dev/null' | |
# Find FIXME, TODO, etc | |
n = !"git ls-files | xargs notes | awk -F: '{ print $1,$2; print $3,$4; print $5}' | grcat conf.notes " | |
latest=describe --abbrev=0 --tags | |
lt=!git latest # latest tag | |
# Fetching | |
f = fetch | |
fp = fetch --prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment