mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 16:33:20 +01:00
Update clean-branch.ps1
This commit is contained in:
parent
77639425d2
commit
41c83f9ec0
@ -18,15 +18,13 @@ try {
|
||||
try {
|
||||
write-progress "Cleaning current branch in repository $RepoDir..."
|
||||
set-location $RepoDir
|
||||
|
||||
& git clean -fdx # force + recurse into dirs + don't use the standard ignore rules
|
||||
if ($lastExitCode -ne "0") { throw "'git clean -fdx' failed" }
|
||||
|
||||
& git submodule foreach --recursive git clean -fdx
|
||||
if ($lastExitCode -ne "0") { throw "'git clean -fdx' in submodules failed" }
|
||||
|
||||
& git status
|
||||
if ($lastExitCode -ne "0") { throw "'git status' failed" }
|
||||
|
||||
write-host -foregroundColor green "OK - cleaned current branch in repository $RepoDir"
|
||||
exit 0
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user