Created
September 13, 2018 01:33
-
-
Save StevePotter/2306ca0bcdb3eca318a431d3b9f03f3b to your computer and use it in GitHub Desktop.
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
Add this to ~/.bash_aliases | |
------------------- | |
##### git ##### | |
alias g-delete-all-branches-except-master="git branch | grep -v "master" | xargs git branch -D" | |
alias gs="git status" | |
alias ga="git add -A" | |
alias gc="git commit -m" | |
alias gac="ga && gc" | |
alias gpu="git push origin HEAD" | |
alias gpuforce="git push origin HEAD --no-verify" | |
alias gcm="git checkout master" | |
alias gnb="git checkout -b" | |
alias gpm="git pull origin master" | |
alias gcpm="git checkout master && git pull origin master" | |
alias git-branch-by-date="git branch --sort=-committerdate" | |
alias g-add-fork="git remote add upstream" | |
alias g-update-fork="git fetch upstream && git checkout master && git merge upstream/master" | |
alias g-delete-tag="git tag -d $1 && git push origin :refs/tags/$1 --no-verify" | |
alias add-write-permissions="sudo setfacl -R -m u:$USER:rwx $1" | |
##### Node #### | |
alias nr="npm run" | |
##### vydia specific ##### | |
alias cdm="cd ~/dev/mobile" | |
alias cdw="cd ~/dev/web" | |
alias vydia-start-server="cdw && vagrant up && vagrant ssh" | |
alias vydia-deploy-web-production="cdw && git checkout deploy/production && git pull origin deploy/production && git merge --no-ff master && git push origin deploy/production && git checkout master" | |
##### generic ##### | |
alias copyLastCmd='fc -ln -1 | awk '\''{$1=$1}1'\'' ORS='\'''\'' | pbcopy' | |
##### react native ##### | |
alias rns="watchman watch-del-all && npm start -- --reset-cache" | |
alias android-developer-menu="adb shell input keyevent 82" | |
##### docker ##### | |
alias dcup="docker-compose up" | |
# docker up detached | |
alias dcupd="docker-compose up -d" | |
alias dcdown="docker-compose down" | |
------------ | |
Then in bash profile: | |
source "$HOME/.bash_aliases" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment