I tried this: git checkout origin/dev # now in detached head state git branch --contains "$(git rev-parse "$feature_branch")" and I got this output: <name of feature branch> not sure what that means On Thu, May 7, 2020 at 4:12 PM Alexander Mills <alexander.d.mills@xxxxxxxxx> wrote: > > so it would be: > > feature_branch='my_branch' # the branch that I want to ensure is > completely merged into origin/dev > git merge-base origin/dev --is-ancestor "$feature_branch" > > that won't work? since git merge-base only works with current branch? > > On Thu, May 7, 2020 at 4:08 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > > > Alexander Mills <alexander.d.mills@xxxxxxxxx> writes: > > > > > I am looking for a command: > > > > > > 1> if branch x contains branch y > > > > > > right now all I can find is > > > > > > 2> if current branch contains commit y > > > > > > can someone please accomplish #1 ? > > > > Study "git merge-base --is-ancestor" perhaps? > > > > -- > Alexander D. Mills > New cell phone # (415)730-1805 > linkedin.com/in/alexanderdmills -- Alexander D. Mills New cell phone # (415)730-1805 linkedin.com/in/alexanderdmills