Skip to content

Instantly share code, notes, and snippets.

@jhorsman
Last active February 4, 2019 08:57
Show Gist options
  • Save jhorsman/8972c0d6cc52a5d60ceb to your computer and use it in GitHub Desktop.
Save jhorsman/8972c0d6cc52a5d60ceb to your computer and use it in GitHub Desktop.
Fetch multiple GIT repos
$ErrorActionPreference = "Stop"
Function FetchRepo($directory)
{
git -C $directory fetch
if ($LASTEXITCODE -gt 0)
{
Throw "Something went wrong while fetching $directory"
}
Write-Host -ForegroundColor green "fetched $directory"
}
Write-Verbose "Fetching all DXA repos"
FetchRepo(".\content-management")
FetchRepo(".\dd4t-java")
FetchRepo(".\html-design")
FetchRepo(".\installation")
FetchRepo(".\web-application")
FetchRepo(".\web-application-java")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment