Git pull change log

后端 未结 2 494
忘掉有多难
忘掉有多难 2020-12-09 04:54

After pulling from a git server, I\'m trying to get a list of all changed files. I don\'t need any specific parts of code, just a list of files (with some kind of indication

相关标签:
2条回答
  • 2020-12-09 05:34

    After a pull, ORIG_HEAD refers to where you were before, and HEAD refers to where you are now. So ORIG_HEAD.. means the changes pulled into the current branch. --max-count=1 means just the last commit, not what you want, as you discovered.

    You probably want something like git diff --name-status ORIG_HEAD.. which will output a single-character status code and a filename for each file changed, aggregating all the commits together. If you want it broken down by each change, you need something like git log --oneline --name-status ORIG_HEAD..

    0 讨论(0)
  • 2020-12-09 05:38

    An alternative command is:

    git pull --stat 
    
    0 讨论(0)
提交回复
热议问题