2

我知道一个 git 存储库,他们的作者在与上游存储库相同的分支中提交更改,并且有时会与上游合并。

我怎么知道哪些补丁不包含在与上游 git 存储库相同的分支中提交的 git 存储库中?

4

1 回答 1

0

你可以试试git cherry

       git-cherry - Find commits not merged upstream

SYNOPSIS
       git cherry [-v] [<upstream> [<head> [<limit>]]]

DESCRIPTION
       The changeset (or "diff") of each commit between the fork-point and
       <head> is compared against each commit between the fork-point and
       <upstream>. The commits are compared with their patch id, obtained from
       the git patch-id program.

       Every commit that doesn't exist in the <upstream> branch has its id
       (sha1) reported, prefixed by a symbol. The ones that have equivalent
       change already in the <upstream> branch are prefixed with a minus (-)
       sign, and those that only exist in the <head> branch are prefixed with
       a plus (+) symbol:
于 2013-01-04T01:42:06.153 回答