How to list all the files in a commit?

后端 未结 30 3026
一个人的身影
一个人的身影 2020-11-22 01:50

I am looking for a simple git command that provides a nicely formatted list of all files that were part of the commit given by a hash (SHA1), with no extraneous

30条回答
  •  情书的邮戳
    2020-11-22 02:32

    I use this to get list of changed files in merge commit

    λ git log -m -1 --name-only --pretty="format:"
    configs/anotherconfig.xml
    configs/configsInRepo.xml
    

    or

    λ git log -m -1 --name-status --pretty="format:"
    A       configs/anotherconfig.xml
    M       configs/configsInRepo.xml
    

提交回复
热议问题