From: Junio C Hamano Date: Thu, 07 May 2020 23:41:56 GMT Subject: Re: check if one branch contains another branch Message-ID: In-Reply-To: Alexander Mills writes: > I assume that: > > git branch -d xxx > > will prevent a delete if the current branch doesn't contain xxx.. > I don't want to have to checkout origin/dev in order to run that command, > that's one part of the problem In that case, don't you want to learn, not just if your 'dev' has anything that is not merged/accepted by origin/dev, what commits in 'dev' are not yet merged in origin/dev? $ git log origin/dev..dev would show them.