我知道一个git存储库,其作者在与上游存储库相同的分支中提交更改,并且有时会与上游合并。
我怎么知道哪些补丁不包含在与上游git存储库相同的分支中提交的git存储库?
答案 0 :(得分: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: