-
-
Save mando20/11278556 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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