Skip to content

Instantly share code, notes, and snippets.

@beaugaines
Last active March 13, 2017 16:19
Show Gist options
  • Save beaugaines/8025285 to your computer and use it in GitHub Desktop.
Save beaugaines/8025285 to your computer and use it in GitHub Desktop.
# git
alias gmv='git remote -v'
alias m='git add .;git commit -m' # ex: "m New Feature"
alias ga='git add .'
alias gl='git pull'
alias gp='git push'
alias gd='git diff'
alias gdd='git diff HEAD HEAD^1'
alias gco='git checkout'
alias gb='git branch'
alias gba='git branch -a'
alias gs='git status'
alias glog='git log --oneline --abbrev-commit --all --graph --decorate --color --branches=*'
alias gphm='git push heroku master'
alias gpsm='git push staging master'
alias gppm='git push production master'
alias gbm='git rebase master'
alias gmd='git merge develop'
alias gcm='git checkout master'
alias gcd='git checkout develop'
alias gffs='git flow feature start'
alias gfff='git flow feature finish'
alias gll='git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat'
alias gls='git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate'
alias gld='git ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative'
alias gfl='git log -u'
alias ggr='git grep -Ii'
alias gci='git pull --rebase && git push'
# Directory navigation
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
alias .6='cd ../../../../../..'
alias .7='cd ../../../../../../..'
# ls
alias l="ls -Alhog"
alias ll="ls -FGlAhptr"
alias le="ls --sort=extension"
# rails
alias mig='be rake db:migrate'
alias dbs='be rake db:seed'
alias dbc='be rake db:create'
alias rmdc='rake db:create && rake db:migrate'
alias dbs='rake db:seed'
alias rg='rails g'
alias rs='rails s'
alias rcs='rails c --sandbox'
alias rc='rails c'
alias s='bin/rspec/'
alias b='bundle'
alias be='bundle exec'
alias bipp='bundle install && pessimize -c patch --no-backup'
alias dbrr='be rake db:drop && be rake db:create && be rake db:migrate && be rake db:seed'
alias rr='rake routes'
# heroku
alias hrc="heroku run rails console"
alias hll='heroku logs'
# SilverSearcher
alias ag="ag --pager more"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment