Skip to content

Instantly share code, notes, and snippets.

@Voltra
Last active January 28, 2026 10:01
Show Gist options
  • Select an option

  • Save Voltra/bd9229ebb3485014d2388fa74303eeca to your computer and use it in GitHub Desktop.

Select an option

Save Voltra/bd9229ebb3485014d2388fa74303eeca to your computer and use it in GitHub Desktop.
Git Flow installation for Git for Windows
###<summary>
### Install script for GIT FLOW
###</summary>
###<remarks>
### Installs GIT FLOW into user binary directory of Windows GIT x64 installation
###</remarks>
###<revisionHistory>
### <revision version="2026.01.28" date="2026-01-28" author="Voltra, github.com/Voltra">Custom tweaks</revision>
### <revision version="2025.11.07" date="2025-11-07" author="Holger Boskugel, github.com/SphereSoftNET">Initial version</revision>
###</revisionHistory>
Write-Host ' '
Write-Host "#############################################################################"
Write-Host "# Install GIT FLOW v2026.01.28 #"
Write-Host "#############################################################################"
Write-Host ' '
if(!(New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
Write-Error "Admin rights required!"
exit
}
$version = '1.12.3'
$gitUsrBinPath = 'D:\prgm\Git\usr\bin'
$filePathZip = Join-Path $([IO.Path]::GetTempPath()) "gitflow-avh.$($version).zip"
$directoryPathUnZip = Join-Path $([IO.Path]::GetTempPath()) "gitflow-avh-$($version)"
if(Test-Path $filePathZip)
{
Remove-Item $filePathZip `
-Force
}
if(Test-Path $directoryPathUnZip)
{
Remove-Item $directoryPathUnZip `
-Recurse `
-Force
}
Write-Host "Download release source archive to ""$($filePathZip)"" ..."
Invoke-WebRequest "https://github.com/petervanderdoes/gitflow-avh/archive/refs/tags/$($version).zip" `
-OutFile $filePathZip
Write-Host 'Done.'
Write-Host ' '
Write-Host "Expand release source archive to ""$($directoryPathUnZip)"" ..."
Expand-Archive $filePathZip `
$(Split-Path $directoryPathUnZip `
-Parent)
Write-Host 'Done.'
Write-Host ' '
Write-Host "Copy GIT FLOW scripts to "$($gitUsrBinPath)" ..."
Copy-Item $(Join-Path $directoryPathUnZip 'git*') `
$gitUsrBinPath `
-Force
Write-Host 'Done.'
if(Test-Path $filePathZip)
{
Remove-Item $filePathZip `
-Force
}
if(Test-Path $directoryPathUnZip)
{
Remove-Item $directoryPathUnZip `
-Recurse `
-Force
}
Write-Host ' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment