Reputation: 31
The following command prints list of commits for specified directory:
git log -- "C:\WORKDIR\REPOS\some_repo\some_folder"
How to get list of files in the same directory with commit date? And to sort them by date or filename?
Upvotes: 1
Views: 778
Reputation: 31
git ls-tree --name-only HEAD foldername/ | while read filename; do echo "$(git log -1 --format="%cd " -- $filename) $filename"; done | sort -r
the same, but with recursive search in subfolders (can take some time)
git ls-tree -r --name-only HEAD foldername/ | while read filename; do echo "$(git log -1 --format="%cd " -- $filename) $filename"; done | sort -r
Upvotes: 2