Skip to content

Instantly share code, notes, and snippets.

@timcunningham
Created January 13, 2020 16:54
Show Gist options
  • Save timcunningham/8c5262164d04fbf2c0b876473b67acf6 to your computer and use it in GitHub Desktop.
Save timcunningham/8c5262164d04fbf2c0b876473b67acf6 to your computer and use it in GitHub Desktop.
$Project = $args[0]
$repo = "IDMI/$Project.git"
$fullPath = "C:\Domains\$Project"
$getLocation = Get-Location
if (-not (Test-Path -Path $fullPath) ) {
Write-Output "Clone $repo to $fullPath"
git clone [email protected]:$repo $fullPath
cd $fullpath
git fetch integration
git branch integration
git pull origin integration
}
else {
Write-Output "$repo to C:\Domains\$Project already exists"
cd $fullpath
git fetch integration
git branch integration
git pull origin integration
}
Set-Location $getLocation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment