1
0
mirror of https://github.com/fleschutz/PowerShell.git synced 2025-01-21 21:28:38 +01:00

Update pull-repo.ps1

This commit is contained in:
Markus Fleschutz 2023-03-28 08:33:54 +02:00
parent 4fadebf14a
commit 035bafb668

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Pulls repository updates
Pulls Git repo updates
.DESCRIPTION
This PowerShell script pulls updates for a local Git repository (including submodules).
This PowerShell script pulls updates into a local Git repository (including submodules).
.PARAMETER RepoDir
Specifies the file path to the local Git repository (default is working directory)
.EXAMPLE
@ -29,7 +29,7 @@ try {
$Result = (git -C "$RepoDir" status)
if ("$Result" -match "HEAD detached at ") { throw "Currently in detached HEAD state (not on a branch!), so nothing to pull" }
Write-Host "⏳ (3/4) Pulling updates... " -noNewline
Write-Host "⏳ (3/4) Pulling latest updates..."
& git -C "$RepoDir" pull --recurse-submodules=yes
if ($lastExitCode -ne "0") { throw "'git pull' failed with exit code $lastExitCode" }