Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果可能的话,我想知道在进行具体提交时我的工作树中的现有文件是什么。
您可以使用git ls-tree -r --name-only <commit>.
git ls-tree -r --name-only <commit>
-r递归到子目录,--name-only防止显示 git 元数据。
-r
--name-only