All of lore.kernel.org
 help / color / mirror / Atom feed
From: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
To: git@vger.kernel.org
Subject: How to determine a branch whether has a specified commit
Date: Thu, 19 Dec 2019 10:35:08 +0800 (GMT+08:00)	[thread overview]
Message-ID: <62a8f522.6873.16f1c0243f6.Coremail.wuzhouhui14@mails.ucas.ac.cn> (raw)

Hi,

I know
    git branch --contains <commit>
can display all local branches that has specified commit. However, specify a
branch and commit, I don't know how to determine whether this branch contains
this commit.

I think
    git branch --contains <commit> | grep <branch name>
is not good enough. Does anyone have a better solution?

Thanks.

             reply	other threads:[~2019-12-19  2:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19  2:35 wuzhouhui [this message]
2019-12-19  3:09 ` How to determine a branch whether has a specified commit Bryan Turner
2019-12-19  4:50   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62a8f522.6873.16f1c0243f6.Coremail.wuzhouhui14@mails.ucas.ac.cn \
    --to=wuzhouhui14@mails.ucas.ac.cn \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.