code

git -> show list of files changed in recent commits in a specific directory

codestyles 2020. 9. 21. 07:43
반응형

git -> show list of files changed in recent commits in a specific directory


How can I do:

svn log -v -l 10 ./

in git?


This one is more similar to the svn command as it shows the file status: Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), and others.

git log --name-status -10 path/to/dir

It is worth looking at the full documentation page for git log. There you will learn that -10 refers to the past 10 commits, and -p will give you the full patch, among a variety of other goodies.


To show all files changed in the last 10 commits, without any commit information, do:

git diff --name-only HEAD~10..HEAD yourdir

Try to do

git log -p -10 yourdir/

It should work.


To show all the commit of your branch(recent and old), you need to count the number of commits in the branch

git rev-list --count branch_name

Once you get all the commit count, you can run

git log --name-status -countNumber /path

참고URL : https://stackoverflow.com/questions/4104764/git-show-list-of-files-changed-in-recent-commits-in-a-specific-directory

반응형