-
Notifications
You must be signed in to change notification settings - Fork 1
/
bash-aliases
33 lines (30 loc) · 1.4 KB
/
bash-aliases
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
alias g='git'
alias ll='ls -l'
alias lla='ls -la'
alias ctags="`brew --prefix`/bin/ctags"
alias e='nvim'
alias find_gems='find . -name 'Gemfile' -o -name '*gemspec' | grep -v './vendor' | xargs grep $GEM | cut -d ':' -f 1 | sort | uniq | xargs echo'
alias update_gems='gems && find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \; && cd -'
alias growl='terminal-notifier -title "Notification" -message'
#### RAILS ####
alias reset='rake db:reset; RAILS_ENV=test rake db:reset;'
alias create='rake db:create; RAILS_ENV=test rake db:create;'
alias drop='rake db:drop; RAILS_ENV=test rake db:drop;'
alias m='rake db:migrate; RAILS_ENV=test rake db:migrate;'
alias rollback='rake db:rollback; RAILS_ENV=test rake db:rollback'
alias b='bundle install --local'
#### git ####
alias st='git status'
alias scm='git story-commit'
alias pullreq='git story-pull-request'
alias cm='git commit'
alias c='git co -'
alias lg='git log --graph'
alias branch='git co master && git pull && git co -b '
alias add='git add -p'
alias amend='git commit --amend --no-edit'
alias amendwith='git commit --amend -m'
alias remotesync='git reset --hard `git branch -vv | grep "^*" | ag -o "(?<=\[)[^:\]]*"`'
alias pr='pry-remote'
alias review='cd `git rev-parse --show-toplevel`; pronto run; cd - > /dev/null;'
alias gpo='open "$(git push 2>&1 | tee /dev/stderr | grep -m 1 'https:.*' | cut -f2,3 -d: | tr -d '[:space:]')"'