Skip to content

Instantly share code, notes, and snippets.

View mu88's full-sized avatar
πŸŒ‹
On very long vacation

Mirko πŸ‡ͺπŸ‡Ί πŸ‡ΊπŸ‡¦ mu88

πŸŒ‹
On very long vacation
View GitHub Profile
@mu88
mu88 / SetDefaultBranch.ps1
Last active March 1, 2018 16:35
Git - Set default branch
Clear-Host
$ErrorActionPreference = 'Stop'
$Git_Branch = 'develop'
$Git_Base_Directory = 'C:\Git'
# get all existing Git repositories => For this, L:\src get filtered for all folders ending on 'v' and a digit because only those folders are accesibble via Git-Server
$Git_Repos = Get-ChildItem $Git_Base_Directory | ?{ $_.PSIsContainer } | Where-Object {$_.Name -match '\w*v\d\b'} | Select-Object Name
ForEach($Git_Repo in $Git_Repos)
@mu88
mu88 / CreateDevelopBranches.ps1
Last active March 1, 2018 16:37
Git - Create develop-Branch in several Git repositories
Clear-Host
$ErrorActionPreference = 'Stop'
# get all existing Git repositories => For this, C:\Git get filtered for all folders ending on 'v' and a digit because only those folders are accesibble via Git-Server
$Git_Repos = Get-ChildItem C:\Git | ?{ $_.PSIsContainer } | Where-Object {$_.Name -match '\w*v\d\b'} | Select-Object Name
$Git_Server = 'https://www.MyGitServer.com'
$Git_Branch = 'develop'
$Git_LocalCloneDirectory = 'C:\temp'