-
Notifications
You must be signed in to change notification settings - Fork 2
/
.bash_profile
66 lines (62 loc) · 2.15 KB
/
.bash_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
export PATH="$HOME/mongodb/bin:/usr/local/mysql/bin:$PATH"
export ANDROID_HOME=$HOME/Library/Android/sdk
export ANDROID_SDK_ROOT=$ANDROID_HOME
export ANDROID_AVD_HOME=$ANDROID_HOME/.android/avd
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/build-tools/28.0.3
export PATH=$PATH:$HOME/ngrok
export PATH=$PATH:/$HOME/Library/Python/2.7/bin
# source secured bash profile, i.e profile with secure content
source ~/.bash_profile_secure
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# ----------------------
# Git Aliases
# https://jonsuh.com/blog/git-command-line-shortcuts/
# ----------------------
alias ga='git add'
alias gaa='git add .'
alias gaaa='git add --all'
alias gau='git add --update'
alias gb='git branch'
alias gbd='git branch --delete '
alias gbda='git branch --merged | egrep -v "(^\*|master|develop|staging)" | xargs git branch -d'
alias gc='git commit'
alias gcm='git commit --message'
alias gcf='git commit --fixup'
alias gcam='git commit -am '
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcomaster='git checkout master'
alias gcos='git checkout staging'
alias gcod='git checkout develop'
alias gcom='git checkout main'
alias gd='git diff'
alias gda='git diff HEAD'
alias gi='git init'
alias glg='git log --graph --oneline --decorate --all'
alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
alias gm='git merge --no-ff'
alias gp='git pull'
alias gpr='git pull --rebase'
alias gpush='git push'
alias gr='git rebase'
alias grc='git rebase --continue'
alias gra='git rebase --abort'
alias gs='git status'
alias gss='git status --short'
alias gst='git stash'
alias gsta='git stash apply'
alias gstd='git stash drop'
alias gstl='git stash list'
alias gstp='git stash pop'
alias gsts='git stash save'
# ----------------------
# Git Functions
# ----------------------
# Git log find by commit message
function glf() { git log --all --grep="$1"; }