Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
checkgit: Check main instead of master (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
chentsulin authored Nov 28, 2021
1 parent a7c3805 commit f4414b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/checkgit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ GIT_BRANCH=$(git branch -v 2> /dev/null | sed '/^[^*]/d');
GIT_BRANCH_NAME=$(echo "$GIT_BRANCH" | sed 's/* \([A-Za-z0-9_\-]*\).*/\1/');
GIT_BRANCH_SYNC=$(echo "$GIT_BRANCH" | sed 's/* [^[]*.\([^]]*\).*/\1/');

# Check if master is checked out
if [ "$GIT_BRANCH_NAME" != "master" ]; then
read -p "Git not on master but $GIT_BRANCH_NAME. Continue? (y|N) " yn;
# Check if main is checked out
if [ "$GIT_BRANCH_NAME" != "main" ]; then
read -p "Git not on main but $GIT_BRANCH_NAME. Continue? (y|N) " yn;
if [ "$yn" != "y" ]; then exit 1; fi;
fi;

Expand Down

0 comments on commit f4414b4

Please sign in to comment.