Skip to content

Instantly share code, notes, and snippets.

@hozefaj
Forked from natelandau/.bash_profile
Last active April 27, 2018 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hozefaj/98f25bfd1365a3e501b1 to your computer and use it in GitHub Desktop.
Save hozefaj/98f25bfd1365a3e501b1 to your computer and use it in GitHub Desktop.
bash profile for mac
export PATH=./node_modules/.bin:$PATH
alias src='source ~/.bash_profile'
#git commands
alias gc='git checkout'
alias gcc='git commit -m'
alias gs='git status'
alias ga='git add --all'
alias gp='git pull --rebase'
alias gb='git branch -vv'
alias gr='git remote -v'
alias grt='git reset --hard'
alias gpub='git push origin publish'
alias grp='git rebase publish'
alias gdev='git push origin dev'
alias gd='git branch -D'
alias gm='git merge'
alias gmx='git merge -X theirs'
alias gh='git push hozefa'
alias gk='gitk &'
alias gda='git branch | grep -v "develop" | xargs git branch -D'
alias gundo='git reset --soft HEAD~1'
#misc
alias cl='clear'
alias mpp='cd /Users/hjodiawalla/Desktop/MPPContentDevelopment/MPPContent/ContentRoot'
alias mppr='cd /Users/hjodiawalla/Desktop/MPPContentDevelopment/MPPResources'
alias kitsune='cd /Users/hjodiawalla/Desktop/MPPContentDevelopment/kitsune'
alias npm='sudo npm install'
alias projects='cd /Users/hjodiwalla/Desktop/My-Projects/projects'
#git branch in bash.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment