View commits that make changes to subfolder

2019-05-26 13:10发布

Assume a repo called drivers which contain sub-folders, eg., ath, b43, p54, etc.

Without subtreeing (creating new repo), is it possible to view commits that applies to a specific sub-folder, eg., view all commits that made changes to ath sub-folder.

1条回答
做自己的国王
2楼-- · 2019-05-26 13:46

You should be able to specify the folder with git log:

git log -- ath

From the man page:

[\--] <path>…

Show only commits that are enough to explain how the files that match the specified paths came to be. (See Historization Simplication)

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

查看更多
登录 后发表回答