pull/2176/merge
Roy Attias 2023-03-18 18:23:57 +02:00 committed by GitHub
commit d8998fda01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -107,7 +107,8 @@ alias gpatch='git format-patch -1'
# push
alias gp='git push'
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 gpom='git push origin $(get_default_branch)'
alias gpu='git push --set-upstream'
@ -204,9 +205,6 @@ function gdv() {
}
function get_default_branch() {
if git branch | grep -q '^. main\s*$'; then
echo main
else
echo master
fi
branch=$(git symbolic-ref refs/remotes/origin/HEAD)
${branch#refs/remotes/origin/}
}