Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View commits that make changes to subfolder

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.

like image 435
artm Avatar asked Nov 21 '25 21:11

artm


1 Answers

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.

like image 62
VonC Avatar answered Nov 23 '25 11:11

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!