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

后端 未结 5 1432
梦毁少年i
梦毁少年i 2020-12-12 16:10

In Subversion svn log is the command to display commit log messages -- for details see the online manual at http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.log

相关标签:
5条回答
  • 2020-12-12 16:26

    Try to do

    git log -p -10 yourdir/
    

    It should work.

    0 讨论(0)
  • 2020-12-12 16:28

    git show $commitId$ --name-only

    It will result in the files which are changed during this commit

    0 讨论(0)
  • 2020-12-12 16:34

    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
    
    0 讨论(0)
  • 2020-12-12 16:37

    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.

    0 讨论(0)
  • 2020-12-12 16:41

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

    git diff --name-only HEAD~10..HEAD yourdir
    
    0 讨论(0)
提交回复
热议问题