Skip to content

Instantly share code, notes, and snippets.

@jhoek
Created November 25, 2021 20:00
Show Gist options
  • Save jhoek/a0f9912f15126087412f37761ce6e101 to your computer and use it in GitHub Desktop.
Save jhoek/a0f9912f15126087412f37761ce6e101 to your computer and use it in GitHub Desktop.
#!/usr/bin/env pwsh
param
(
[Parameter(Mandatory, Position = 0)]
[string]$CommitMsgFile
)
$Branch = & git rev-parse --abbrev-ref HEAD
Add-Content -Path $CommitMsgFile -Value "[$Branch]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment