Skip to content

Instantly share code, notes, and snippets.

@weishang
Last active December 14, 2024 00:26
Show Gist options
  • Save weishang/c082aa7d790bfb08d3d8f3f459d5dbc8 to your computer and use it in GitHub Desktop.
Save weishang/c082aa7d790bfb08d3d8f3f459d5dbc8 to your computer and use it in GitHub Desktop.
git alias

alias gfa="git fetch --all"
alias gcb="git rev-parse --abbrev-ref HEAD"
alias glb="git branch -vv"
alias gpb='git push origin $(gcb)'
alias gl='git log --oneline'
alias gsu='git submodule update'
 
 
function gc () {
    git checkout feat-sar-$1
}

function gcmr () {
    git checkout -b feat-sar-$1 -t origin/master
}

function gcmn () {
    git checkout -b feat-sar-$1 -t origin/main
}

function gdb() {
    git branch -D $1
}
 
 
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment