Am I writing a powershell script that should push code into multiple git repositories at the same time?
Here's the script I still have:
param(
[parameter(Mandatory=$true)]
[string]$repoPath,
[parameter(Mandatory=$true)]
[array]$remoteRepos
)
pushd $repoPath
$remoteRepos | % {
& git push $_ master --fore -v
}
popd
This is how I execute the script:
gitdeploy.ps1 -repoPath c:\code\myrepo -remoteRepos repo1,repo2
How to execute & git push $_ master --fore -vin such a way that it does not block?
Decision
Thanks to @Jamey for the solution. I ran this command:
Start-Process "cmd.exe" "/c git push $_ master --force -v"
Micah source
share