Hi, On 9/3/24 17:18, Loredana Tralli wrote:
Is it possible to have a git command to find out which is the parent branch?
You can ask for the "upstream" branch of a given branch, using the "@{upstream}" syntax, that is documented briefly in the git-rev-parse(1) manual page.
The upstream branch is automatically set if you check out a branch name that only exists in a remote repository but not locally (then, a local branch is created), or explicitly set with "git branch --set-upstream-to".
Simon