Hi Alena
The default behaviour on GoCD git materials has been
git clean -dffx since GoCD 20.6.0 as far as I can tell. You had to specifically opt in for the "old" behaviour of
git clean -dff However based on the ticket you raised at
https://github.com/gocd/gocd/issues/12806 my
guess is that you are using a custom plugin for git materials which has its own logic and does not rely on GoCD's built in git material.
Both would need the plugins to be updated/changed.
A workaround for now may be to clean the entire working directory at GoCD level in the stage configuration (essentially an "rm -rf working-dir") rather than relying on something at material level, but this would require a fresh clone for every build, which some people would rather not do (for speed reasons) when using static agents.
-Chad