From: Simon Richter Date: Tue, 03 Sep 2024 13:33:39 GMT Subject: Re: Ask for feature on git Message-ID: <45a51124-7249-4678-a723-4ab9f82a5f2e@hogyros.de> In-Reply-To: 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