Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

73 lines (61 sloc) 2.082 kb
# Aliases
# -F: trailing slash for dirs etc.
# -G: color
alias l="ls -FG"
alias ll="ls -alFG"
alias gs="git status"
alias gst="git stash"
alias gsta="git stash apply"
alias gc="git commit --verbose"
alias gca="git commit --amend"
alias gp="git push"
alias gcp="gc && gp"
alias gpl="git pull"
alias gf="git fetch"
alias gfl="git fetch && gl"
alias gb="git branch"
alias gba="git branch -avv --color | cut -c-93"
alias ga="git add"
alias ga.="git add . && git status"
alias gaa="git add --all && git status"
alias gaac="git add --all && gc"
alias gap="git add -p"
alias gm="git merge"
alias gd="git diff"
alias gdw="git diff --color-words"
alias gdc="git diff --cached"
alias gdcw="git diff --cached --color-words"
alias gr="git reset"
alias gcdf="git clean -df"
alias gco="git checkout"
alias gl="git log --oneline --graph --all --decorate --color"
alias open-merged-files='mvim -p $(ruby -e "puts \`git status\`.split(\"\\n\").select {|f| f =~ /both modified/ }.map {|f| f.gsub(/#\\s+both modified:\\s*/, \"\") }.join(\" \")")'
alias g="git add --all && git commit --verbose && git push"
# List files recursively
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
alias gll="git log --pretty=format:'%C(yellow)%h%Creset%C(red bold)%d%Creset %s %C(yellow)(%an, %cr)' --abbrev-commit --graph --all"
ft() {
find . -name "$2" -exec grep -il "$1" {} \;
}
please() {
if [[ $# == 0 ]]; then
sudo $(history -p '!!')
else
sudo "$@"
fi
}
# Variables
export EDITOR="vim"
# add /usr/local/sbin ?
PATH=/usr/local/share/npm/bin:$PATH
PATH=/usr/local/Cellar/ruby/1.9.3-p194/bin:$PATH
PATH=/usr/local/Cellar/ruby/1.9.3-p327/bin:$PATH
PATH=$PATH:/usr/texbin
PATH=$PATH:~/bin
PATH="/usr/local/bin":$PATH
export PATH
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ [\1]/'
}
export PS1="\h:\W\$(parse_git_branch)$ "
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Jump to Line
Something went wrong with that request. Please try again.