Browse Source

git-pushb: also don't push main branch

raylu 4 năm trước cách đây
mục cha
commit
ba211bcfef
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      git-pushb

+ 1 - 1
git-pushb

@@ -3,7 +3,7 @@
 set -euo pipefail
 
 BRANCH=`git symbolic-ref --short HEAD`
-if [ $BRANCH == master ]; then
+if [[ $BRANCH == master || $BRANCH == main ]]; then
   echo "not pushing $BRANCH"
   exit 1
 fi