Add some useful git stuff

This commit is contained in:
Andrew Tomaka 2015-11-03 16:44:21 -05:00
parent 5fec63a75c
commit ced1a239fd
2 changed files with 3 additions and 0 deletions

View file

@ -29,6 +29,7 @@ alias gcm="echo Do not specify message at command line. Use gc"
alias gco="git checkout"
alias gd="git diff"
alias gdc="git diff --cached"
alias gdm='git branch --merged | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 git branch -d'
alias gds="git diff --stat"
alias gdss="git diff --shortstat"
alias gfa="git-date-added"
@ -38,6 +39,7 @@ alias gl="git log"
alias gh="git hist"
alias ghd="git hist-details"
alias ght="git hist-tags"
alias gmr="git most-recent-by-branch"
alias gp="git push"
alias gpf="git push --force"
alias gpl="git pull"

View file

@ -10,6 +10,7 @@
hist = log --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
hist-details = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
hist-tags = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
most-recent-by-branch = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
[color]
ui = auto
[color "branch"]