[英]List of all commits that modify a path and aren't merged into given branch
Given a specific branch and path, get a list of all commits that: 给定特定的分支和路径,获取以下所有提交的列表:
Manual inspection (eg git log --all -- path/to
) is not an option - I want the full list of commits (or branches containing commits) that have unmerged changes. 手动检查(例如
git log --all -- path/to
)不是一种选择-我想要具有未合并更改的提交(或包含提交的分支)的完整列表。
git branch --no-merge
is also no good, apparently it can't be limited to a path. git branch --no-merge
也不好,显然不能局限于路径。
To answer my own question: 要回答我自己的问题:
git log --all --oneline ^my_branch -- path/to/my/stuff
Further, to get the names of branches containing such commits: 此外,要获取包含此类提交的分支的名称,请执行以下操作:
git log --all --oneline ^my_branch --pretty=format:%H -- path/to/my/stuff | xargs git describe --contains --all
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.