2022-11-16 13:30:45 +02:00

15 lines
240 B
Bash
Executable File

#!/usr/bin/env bash
# this script is meant to be sourced
function git:branch-name {
git rev-parse --abbrev-ref HEAD
}
function git:is-on-main {
if [[ "$(git:branch-name)" == "main" ]]
then return 0
else return 1
fi
}