In my setup I have a TFS 2017 build definition pointing at a Git repository.
During the build execution other Git repositories are fetched and dropped into the Build.SourcesDirectory via custom scripts.
The next time I queue a build it will fail as the source directory is not cleaned as "git clean -fdx" is not enough. As my sources directory contains other .git folders the clean command needs to be "git clean -ffdx" to really really force the clean to occur.
In my setup I have a TFS 2017 build definition pointing at a Git repository.
During the build execution other Git repositories are fetched and dropped into the Build.SourcesDirectory via custom scripts.
The next time I queue a build it will fail as the source directory is not cleaned as "git clean -fdx" is not enough. As my sources directory contains other .git folders the clean command needs to be "git clean -ffdx" to really really force the clean to occur.
Example: