how to find out list of all changed files in git for full jenkins build and not for a particular commit?

前端 未结 5 1662
梦毁少年i
梦毁少年i 2020-12-05 19:57

How to find all changed files since last commited build in GIT ? I want to build not only the changed files at head revision but also, all the changed files which got chang

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-05 20:15

    Maybe this is what you are looking for:

    git whatchanged origin/master -n 1
    

    This will tell you all changed files since last commited build.

    To know more about git-whatchanged command: https://git-scm.com/docs/git-whatchanged/1.8.3

    Also, if you want to know the changes of previous commit only, the modified command is:

    git whatchanged -n 1
    

    Hope this help.

提交回复
热议问题