seek-oss / kpt-functions

A library of Kpt functions for extending Kpt's functionality
MIT License
3 stars 3 forks source link

fix an issue where switching between commits might cause unstaged changes #45

Closed kinyat closed 1 year ago

kinyat commented 1 year ago

The gantry-state rendering functionality is not working properly after the changes made in https://github.com/SEEK-Jobs/gantry-packages/pull/1181

The root cause of the issue is that during the process of switching between different commits in the packages, there might be some leftover unstaged changes caused by newly added folders or files. In this particular case, the tools folder was left hanging, and it prevented Git from checking out another commit.

To resolve this problem, this pull request enables the force mode, which instructs Git to discard any local changes (such as the tools folder in this case) and proceed with the checkout.

After applying this fix, the rendering script is once again working properly.