如何找出分支中哪些文件已被修改?

发布于 2024-08-11 16:29:06 字数 110 浏览 5 评论 0原文

我有两个分支:master 和 bug1。我检查了 bug1,做了很多更改和多次提交。如何获取分支上更改的所有文件的列表?我对哈希值、日期或任何其他提交相关的细节不感兴趣。我只想获得一个简单的触摸文件列表。

I have two branches: master and bug1. I checked out bug1, did bunch of changes and multiple commits. How do I get a list of all files that were changed on the branch? I'm not interested in hashes, dates or any other commit related details. I just want to get a simple list of touched files.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凑诗 2024-08-18 16:29:07
git diff --name-only master bug1
git diff --name-only master bug1
你丑哭了我 2024-08-18 16:29:07

来自您的主人:

git diff --name-status BRANCH

请参阅 git diff 手册页 了解详细信息。

From your master:

git diff --name-status BRANCH

See the git diff man page for details.

ゞ花落谁相伴 2024-08-18 16:29:07

在一个被建议与此问题重复的问题上给出的答案是对此问题的更正确答案。

如果您遵循此页面上当前的任何其他答案,您还将在输出中获得在分支上修改您实际感兴趣的文件期间发生的任何更改。

因此,它们仅在有限的情况下是正确的,在这种情况下,您的 master 恰好看起来与分支分叉时的情况完全相同。

这里的问题指定它只需要沿分支修改的文件(即相对于分叉点,或分支和主的“合并基础”)

The answer given on a question that was suggested to be a duplicate of this one, is a more correct answer to this question.

If you follow any other answers currently on this page here, you will also get in your output, any changes that have happened to master during the time that the files you are actually interested in were modified on branch.

So they are only correct in the limited subset of cases where your master happens to look exactly how it did back when the branch was forked off.

The question here specifies that it wants only the files that were modified along the branch (i.e. relative to the fork point, or "merge-base" of branch and master)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文