jenkins Wipe out repository and force clone vs Clean before checkout

后端 未结 1 685
猫巷女王i
猫巷女王i 2021-02-03 22:45

I am trying to understand the difference between the two options “Wipe out repository and force clone” and “Clean before checkout” for pulling a git repo. Looking at the help se

1条回答
  •  有刺的猬
    2021-02-03 23:30

    Wipe out repository & force clone will clean the entire project workspace and clone the project once again before building. It could be time consuming depends on the project size. If the project is 1GB, it downloads 1GB everytime you build it.

    Clean before checkout removes the files created as part of build - say your test results etc - resets the files if they were updated & pulls the latest changes if they have been updated. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory. It downloads only the delta which could be few MBs. So it is less time consuming.

    So you can go ahead use Clean before checkout without affecting the build. Have been using this option for more than 4 years without any issues.

    0 讨论(0)
提交回复
热议问题