Skip to content

Instantly share code, notes, and snippets.

@mikaelbr mikaelbr/.gitalias
Created Jun 22, 2017

What would you like to do?
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
alias gp='git push'
alias gpl='git pull --rebase'
alias gpd='git pull origin'
alias gf='git fetch'
alias gfa='git fetch --all'
alias gs='git status'
alias gst='git status'
alias ga='git add'
alias gaa='git add --all'
alias gb='git branch'
alias gba='git branch --all'
alias gc='git commit'
alias gcl='git clean -fd'
alias gca='git commit --all'
alias grh='git reset --hard'
alias gd='git diff'
alias go='git checkout'
alias gco='git checkout'
alias got='git'
alias get='git'
alias glgr='git log --color --graph --pretty=format:"%h %s" --graph'
alias gl="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gpsc='git push origin $(git rev-parse --abbrev-ref HEAD)'
alias gmm='git rev-parse --abbrev-ref HEAD | pbcopy; git checkout develop; git pull origin $(pbpaste);'
alias gpm='git pull origin develop'
alias gm='git merge --no-ff'
alias gdl="git branch -D $1"
alias gdlr='git push origin --delete $1'
alias gdla='git for-each-ref --format="%(refname:short)" refs/heads/f_qa\* | xargs git branch -D'
alias gdlaremote='git for-each-ref --format="%(refname)" refs/remotes/origin/f_qa\* | xargs git push origin --delete'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.