Last active
December 10, 2016 16:53
-
-
Save mediabeastnz/8851278 to your computer and use it in GitHub Desktop.
Terminal functions and aliases.
This file contains 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
## You can add these to your ./Users/User/.bash_profile so they can be called while in terminal. ## | |
## Aliases ## | |
alias wget="curl -O" | |
alias hosts='sudo nano /private/etc/hosts' | |
alias mamp='sudo /Applications/MAMP/bin/apache2/bin/apachectl restart' | |
alias g='git' | |
alias gall='git add --all' | |
alias gpush='git push' | |
alias gpull='git pull' | |
alias gpp='git pull && git push' | |
alias gc='git commit -m' | |
alias gs='git status' | |
alias gl='git lg' | |
alias watch='bundle exec compass watch' | |
## Functions ## | |
## git Add, Commit and then Push ## | |
function gacp(){ | |
if [ -n "$1" ]; then | |
git add --all && git commit -m "$1" && git push | |
else | |
echo 'Could not run command, please add a commit message! e.g. gacp "commit message"'; | |
fi | |
} | |
## e.g. $ server username ## | |
function server1(){ | |
ssh ${1}@111.111.11.11 | |
} | |
function server2(){ | |
ssh ${1}@111.111.11.11 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment