bin: rmbr handle main/master

This commit is contained in:
2022-02-02 11:47:44 +00:00
parent 892c00f3f5
commit c34cb696f5

View File

@@ -4,4 +4,9 @@ if [ $# -lt 1 ] ; then
exit 1
fi
echo Removing branch $1
git checkout $1 && git rebase master && git checkout master && git branch -d $1
# Check for master/main
TRUNK=$(git branch -l main | sed -e 's/\* //g')
if [ "$TRUNK" == "" ] ; then
TRUNK=master
fi
git checkout $1 && git rebase $TRUNK && git checkout $TRUNK && git branch -d $1