From 840caf63d51b1989a2cc9812162e7e1a34ccfbee Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Thu, 4 Apr 2013 14:37:38 -0400 Subject: [PATCH] Add more git aliases --- .gitconfig | 22 ++++++++++++++++------ .zshrc | 13 +++++++------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.gitconfig b/.gitconfig index d5ac6b0..0c5ac2b 100644 --- a/.gitconfig +++ b/.gitconfig @@ -5,31 +5,39 @@ [color] ui = auto [alias] + b = branch + h = !git head + l = !git ll -25 p = push + r = reset + s = stash + x = reset --hard + sl = stash list + sp = stash pop + sd = stash drop + sa = stash apply st = status ci = commit + cp = cherry-pick co = checkout - di = diff dc = diff --cached + di = diff amend = commit --amend aa = add --all head = !git l -1 - h = !git head hp = "!source ~/.githelpers && show_git_head" - r = !git l -20 re = remote ra = !git r --all ff = merge --ff-only pff = pull --ff-only noff = merge --no-ff - l = "!source ~/.githelpers && pretty_git_log" - la = !git l --all + la = !git ll --all + ll = "!source ~/.githelpers && pretty_git_log" div = divergence gn = goodness gnc = goodness --cached fa = fetch --all pom = push origin master - b = branch ds = diff --stat=160,120 dh1 = diff HEAD~1 @@ -37,3 +45,5 @@ tool = vimdiff [core] editor = /usr/bin/vim +[push] + default = simple diff --git a/.zshrc b/.zshrc index 128c66b..8cc0543 100644 --- a/.zshrc +++ b/.zshrc @@ -29,18 +29,19 @@ export PATH="$HOME/bin:$PATH" # Unbreak broken, non-colored terminal export TERM=xterm-256color -alias ls='ls -G' -alias ll='ls -lG' -alias l='ls -laG' -alias duh='du -csh' -export GREP_OPTIONS="-nRi --color --exclude-dir=tmp --exclude-dir=log --exclude-dir=public --exclude-dir=vendor/assets --exclude-dir=fonts --exclude-dir=images --exclude-dir=coverage" - # Unbreak history export HISTSIZE=10000 export HISTFILE="$HOME/.history" export SAVEHIST=$HISTSIZE +# Grep tweaks +export GREP_OPTIONS="-nRi --color --exclude-dir=tmp --exclude-dir=public --exclude-dir=log --exclude-dir=vendor/assets --exclude-dir=fonts --exclude-dir=images --exclude-dir=coverage --exclude-dir=rdoc" + # Alias +alias ls='ls -G' +alias ll='ls -lG' +alias l='ls -laG' +alias duh='du -csh' alias r=rails alias g=git alias gco='git co'