git - 查看文件夹的 git 历史记录

标签 git

如何查看文件夹中所有文件的 git 日志历史记录?

我找到了几篇关于如何显示特定文件日志的帖子,但没有找到特定文件夹的日志。

最佳答案

您可以使用 foldernamefoldername/*。无论哪种方式都应该有效。

git log -- path/to/folder
git log -- path/to/folder/*

此方法不会跟踪重命名文件的历史。

请注意 -- 也是可选的。 (来自 git 日志手册)

[--] <path>...

           Show only commits that are enough to explain how the files that match the specified paths came to be. See History Simplification below for
           details and other simplification modes.

           Paths may need to be prefixed with -- to separate them from options or the revision range, when confusion arises.

关于git - 查看文件夹的 git 历史记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11950037/

相关文章:

git - 是否可以通过试运行来 git stash pop?

git - 查找 source 从 git 分支的位置

git - AWS Elastic Beanstalk + Git 子模块

Git check out HEAD+1 和 HEAD-1

git - 使用现有 Gitolite 配置设置 GitLab 的简便方法

git - 分支自动完成不适用于推送的 git 别名

git - 二分法结束时 git 告诉我 merge 基础不好——我现在该如何进步?

python - 是否有任何交叉引用 Python 源代码的 git web 网关

git - 推送到 github repo 时出错

git - 使用 HTTPS 从 gitlab CI 作业克隆私有(private) Repo 而无需将我的凭据公开到 CLI