mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-22 20:51:17 +01:00
Add --force to git fetch
This commit is contained in:
parent
d2889b1b57
commit
9e448e6a90
@ -26,7 +26,7 @@ try {
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
& git -C "$RepoDir" fetch --all --recurse-submodules --prune --prune-tags --force --jobs=4
|
||||
& git -C "$RepoDir" fetch --all --recurse-submodules --prune --prune-tags --force
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch' in $RepoDir failed" }
|
||||
|
||||
$RepoDirName = (get-item "$RepoDir").Name
|
||||
|
@ -31,7 +31,7 @@ try {
|
||||
$FolderName = (get-item "$Folder").Name
|
||||
"⏳ Step $Step/$($FolderCount): Fetching 📂$FolderName..."
|
||||
|
||||
& git -C "$Folder" fetch --all --recurse-submodules --prune --prune-tags --force --jobs=4
|
||||
& git -C "$Folder" fetch --all --recurse-submodules --prune --prune-tags --force
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch' in $Folder failed" }
|
||||
|
||||
$Step++
|
||||
|
@ -27,7 +27,7 @@ try {
|
||||
$RepoDirName = (get-item "$RepoDir").Name
|
||||
"🢃 Fetching updates for Git repository 📂$RepoDirName ..."
|
||||
|
||||
& git fetch --all --recurse-submodules --jobs=4
|
||||
& git fetch --all --recurse-submodules --prune --prune-tags --force
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch' failed" }
|
||||
|
||||
& git checkout -b "$BranchName"
|
||||
|
@ -31,7 +31,7 @@ try {
|
||||
if ("$Result" -notmatch "nothing to commit, working tree clean") { throw "Git repository is NOT clean: $Result" }
|
||||
|
||||
"⏳ Step 2/3: Fetching latest updates and switching branch..."
|
||||
& git fetch --all --recurse-submodules --prune --prune-tags
|
||||
& git fetch --all --recurse-submodules --prune --prune-tags --force
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch' failed" }
|
||||
|
||||
& git checkout --recurse-submodules "$BranchName"
|
||||
|
Loading…
Reference in New Issue
Block a user