It is difficult to find the parent-branch in git ...
My current solution:
git show-branch -a 2>/dev/null \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| perl -ple 's/\[[A-Za-z]+-\d+\][^\]]+$//; s/^.*\[([^~^\]]+).*$/$1/'
Source: https://stackoverflow.com/a/74314172/633961
Why is it difficult to find the parent-branch in git?
This question is not about "how to solve this?". It is about "why is it not straight forward?"