Added git_branch() and git_customer_branch()

This commit is contained in:
Gerhard Hoffmann 2022-07-08 17:23:03 +02:00
parent b8bc61daea
commit bd0d07f56f

View File

@ -57,6 +57,18 @@ revert_to_commit_before_pull () {
} }
# revert_to_commit_before_pull # revert_to_commit_before_pull
git_branch () {
# always relative to a git repository
echo $(git branch -a | grep '*' | awk '{ print $2 }')
}
git_customer_branch () {
if cd_customer_repository; then
customer_branch=$(git_branch)
cd_home;
echo $customer_branch
fi
}
# clone the customer repository in ./workspace. # clone the customer repository in ./workspace.
# this is done only once. # this is done only once.
# #