diff --git a/Scripts/clean-repo.ps1 b/Scripts/clean-repo.ps1 index bab58ddd..a26dd38b 100755 --- a/Scripts/clean-repo.ps1 +++ b/Scripts/clean-repo.ps1 @@ -18,11 +18,11 @@ try { $Null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - & git -C "$RepoDir" clean -fdx # force + recurse into dirs + don't use the standard ignore rules - if ($lastExitCode -ne "0") { throw "'git clean -fdx' failed" } + & git -C "$RepoDir" clean -xfd -f # force + recurse into dirs + don't use the standard ignore rules + if ($lastExitCode -ne "0") { throw "'git clean -xfd -f' failed" } - & git -C "$RepoDir" submodule foreach --recursive git clean -fdx - if ($lastExitCode -ne "0") { throw "'git clean -fdx' in submodules failed" } + & git -C "$RepoDir" submodule foreach --recursive git clean -xfd -f + if ($lastExitCode -ne "0") { throw "'git clean -xfd -f' in submodules failed" } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds "โœ”๏ธ cleaned Git repository ๐Ÿ“‚$RepoDirName in $Elapsed sec" diff --git a/Scripts/clean-repos.ps1 b/Scripts/clean-repos.ps1 index 9c30aba0..64002763 100755 --- a/Scripts/clean-repos.ps1 +++ b/Scripts/clean-repos.ps1 @@ -23,11 +23,11 @@ try { $FolderName = (get-item "$Folder").Name "๐Ÿงน Cleaning ๐Ÿ“‚$FolderName ..." - & git -C "$Folder" clean -fdx # force + recurse into dirs + don't use the standard ignore rules - if ($lastExitCode -ne "0") { throw "'git clean -fdx' failed" } + & git -C "$Folder" clean -xfd -f # force + recurse into dirs + don't use the standard ignore rules + if ($lastExitCode -ne "0") { throw "'git clean -xfd -f' failed" } - & git -C "$Folder" submodule foreach --recursive git clean -fdx - if ($lastExitCode -ne "0") { throw "'git clean -fdx' in submodules failed" } + & git -C "$Folder" submodule foreach --recursive git clean -xfd -f + if ($lastExitCode -ne "0") { throw "'git clean -xfd -f' in submodules failed" } } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds