如何做Git日志只看到合并到主分支?
收藏

在我的工作过程中,我需要向服务器管理员提供文件列表。 该列表来自我的工作分支(分支A)到Master分支的合并。

因此,我将分支A合并到分支Master中,然后部署Master。

Right now the best I could do with git log is the following but this list contains other commit as well ( not only the merge I'm looking for ):
git log -m --name-only --author=[NAME]

So basically I need to retrieve the files list for the merge of Branch A into Master Branch

cli命令可能吗?

最佳答案

Narrow it down using git log --merges --author to figure out the commit you want and then try

git diff --name-only ${MERGE_SHA}^1..${MERGE_SHA}

    公众号
    关注公众号订阅更多技术干货!