Skip to content

Instantly share code, notes, and snippets.

@thiagolsfortunato
Last active January 13, 2020 16:14
Show Gist options
  • Save thiagolsfortunato/47a4bc2ff5961c681fc74469ce0b10dd to your computer and use it in GitHub Desktop.
Save thiagolsfortunato/47a4bc2ff5961c681fc74469ce0b10dd to your computer and use it in GitHub Desktop.
.git_aliases
# shellcheck shell=sh
alias {gadd,ga}='git add '
alias {gbra,gb}='git branch'
alias {gco,go}='git checkout'
alias {gcob,gob}='git checkout -b '
alias {gcom,gc}='git commit'
alias {gcomam,gcam}='git commit --amend'
alias {gpul,gpl}='git pull '
alias {gpus,gps}='git push '
alias {gpusf,gpsf}='git push -f'
alias {gsta,gst}='git status'
alias {gl}='git log'
alias {glo}='git log --oneline'
alias g='git'
alias gg='git grep '
alias gpushom='git push origin master'
alias gpullom='git pull origin master'
@thiagolsfortunato
Copy link
Author

thiagolsfortunato commented Jan 9, 2020

add on ~/.bashrc:

source ~/.git_aliases
source /usr/share/bash-completion/completions/git
complete -o default -o nospace -F _git g

https://gist.github.com/thiagolsfortunato/1314ddbc021586e17434b7377c523a6f#file-bashrc-L171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment