How to get ONLY filename with path using git log?

后端 未结 3 1792
情深已故
情深已故 2020-12-20 23:22

I used almost all git log commands yet i haven\'t found a best way to do this. I need only this - get only file name with path nothing else

/path/filename.tx         


        
3条回答
  •  别那么骄傲
    2020-12-20 23:50

    Use --name-only and remove the message with an empty format

    git log --name-only --format=""
    

    Just use all other git log options as usual. E.g.

    git log --name-only --format="" -n 2 master
    

    Optionally sort and remove dupplicates

    git log --name-only --format="" | sort | uniq
    

提交回复
热议问题