bin: rmbr handle main/master
This commit is contained in:
7
bin/rmbr
7
bin/rmbr
@@ -4,4 +4,9 @@ if [ $# -lt 1 ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo Removing branch $1
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user