Merge 949309d9d4 into e38696a0ac
commit
d8998fda01
|
|
@ -107,7 +107,8 @@ alias gpatch='git format-patch -1'
|
||||||
# push
|
# push
|
||||||
alias gp='git push'
|
alias gp='git push'
|
||||||
alias gpd='git push --delete'
|
alias gpd='git push --delete'
|
||||||
alias gpf='git push --force'
|
alias gpf='git push --force-with-lease'
|
||||||
|
alias gpff='git push --force'
|
||||||
alias gpo='git push origin HEAD'
|
alias gpo='git push origin HEAD'
|
||||||
alias gpom='git push origin $(get_default_branch)'
|
alias gpom='git push origin $(get_default_branch)'
|
||||||
alias gpu='git push --set-upstream'
|
alias gpu='git push --set-upstream'
|
||||||
|
|
@ -204,9 +205,6 @@ function gdv() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_default_branch() {
|
function get_default_branch() {
|
||||||
if git branch | grep -q '^. main\s*$'; then
|
branch=$(git symbolic-ref refs/remotes/origin/HEAD)
|
||||||
echo main
|
${branch#refs/remotes/origin/}
|
||||||
else
|
|
||||||
echo master
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue