Skip to content

Instantly share code, notes, and snippets.

@mando20
Forked from ebinnion/.bash_profile
Created April 25, 2014 05:34
Show Gist options
  • Select an option

  • Save mando20/11278556 to your computer and use it in GitHub Desktop.

Select an option

Save mando20/11278556 to your computer and use it in GitHub Desktop.
PATH=$PATH:~/bin
export PATH
alias ll='ls -lah'
# Git aliases
alias softreset='git reset --soft HEAD^'
alias hardreset='git reset --soft HEAD^'
# Following http://viget.com/inspire/terminal-aliases-for-git
alias gst='git status'
alias gc='git commit'
alias gco='git checkout'
alias gl='git pull'
alias gpom="git pull origin master"
alias gp='git push'
alias gd='git diff | mate'
alias gb='git branch'
alias gba='git branch -a'
alias del='git branch -d'
quickpush(){
git add -A
if [ "$1" = "" ]
then
gc -am 'quick push'
else
gc -am '$1'
fi
gp origin master
}
# Directory helpers
alias tosites='cd ~/Documents/Websites/'
alias opensites='open ~/Documents/Websites'
# Need to rework these to consider if no parameters passed. Nest ifs
totheme() {
if [ "$1" = "" ] ; then
echo "ERROR: Parameter 1 needs to be site URL"
fi
tosites
cd $1
cd wp-content/themes/
if [ "$2" = "" ]
then
cd cw
else
cd $2
fi
}
toplugin() {
if [ "$1" = "" ] ; then
echo "ERROR: Parameter 1 needs to be site URL"
fi
if [ "$2" = "" ] ; then
echo "ERROR: Parameter 2 must be plugin name"
fi
tosites
cd $1
cd wp-content/plugins/
cd $2
}
dowork() {
if [ "$1" = "" ] ; then
echo "ERROR: You must pass in a URL as first parameter"
fi
open -a "Google Chrome" http://$1
tosites
cd $1
if [ "$2" = "" ]
then
theme cw
else
theme $2
fi
atom .
grunt
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment