Last active
October 25, 2017 20:18
-
-
Save vagnerzampieri/4492613 to your computer and use it in GitHub Desktop.
Alias público, se tiver coisas interessantes, contribua.
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
function mkcd(){ | |
mkdir $1; | |
cd $1; | |
} | |
# Apt | |
alias apti='sudo apt-get install' | |
alias apts='sudo apt-cache search' | |
alias aptp='sudo apt-get --purge remove' | |
alias aptr='sudo apt-get remove' | |
# Rails | |
alias rkdbd='rake db:drop' | |
alias rkdbc='rake db:create' | |
alias rkdbm='rake db:migrate' | |
alias rkdbs='rake db:seed' | |
alias rkdbi='rake db:drop db:create db:migrate db:seed' | |
alias rkdbr='rake db:rollback' | |
alias rkdbtp='rake db:test:prepare' | |
alias rkt='rake -T' | |
alias rkr='rake routes' | |
alias rks='rake spec' | |
alias rc='rails c' | |
alias rg='rails g' | |
alias rd='rails destroy' | |
alias rs='rails s' | |
alias rdb='rails dbconsole' | |
# RSpec | |
alias rsmod='rspec `git ls-files --modified --others spec`' | |
# Git | |
alias g='git' | |
alias gs='git status' | |
alias gpl='git pull --rebase' | |
alias gplo='git pull --rebase origin' | |
alias gplom='git pull --rebase origin master' | |
alias gp='git push' | |
alias gpo='git push origin' | |
alias gbrd='git push origin --delete' | |
alias gpom='git push origin master' | |
alias ga='git add' | |
alias gc='git commit -m' | |
alias gca='git commit -am' | |
alias gba='git branch -a' | |
alias gbd='git branch -d' | |
alias gco="git checkout" | |
alias gcb='git checkout -b' | |
alias gst='git stash' | |
alias gstp='git stash pop' | |
alias gm="git merge" | |
alias gd='git diff --ignore-space-change' | |
alias gsi="git submodule init" | |
alias gsu="git submodule update" | |
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
# Bundle | |
alias b='bundle' | |
alias bu='bundle update' | |
alias bex='bundle exec' | |
alias brkdbd='bundle exec rake db:drop' | |
alias brkdbc='bundle exec rake db:create' | |
alias brkdbm='bundle exec rake db:migrate' | |
alias brkdbs='bundle exec rake db:seed' | |
alias brkdbi='bundle exec rake db:drop db:create db:migrate db:seed' | |
alias brkdbr='bundle exec rake db:rollback' | |
alias brkdbtp='bundle exec rake db:test:prepare' | |
alias brkt='bundle exec rake -T' | |
alias brkr='bundle exec rake routes' | |
alias brks='bundle exec rake spec' | |
alias brc='bundle exec rails c' | |
alias brg='bundle exec rails g' | |
alias brd='bundle exec rails destroy' | |
alias brs='bundle exec rails s' | |
alias brdb='bundle exec rails dbconsole' | |
# Gem | |
alias gei='gem install' | |
alias geu='gem uninstall' | |
#Docker | |
alias dl='sudo docker ps -l -q' | |
alias myfinance_docker="sudo docker exec -it `dl` script /dev/null -c 'bash -ilc tmux'" | |
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
# Adicione as linhas abaixo no se bash | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Você usa o gst para status, eu uso 'gst' para Stash e 'gstp' para Stash Pop. Meu git status é só um 'gs' pois é executado muito mais vezes e é uma letra a menos. :)