A simple powershell script to clean up local branches that have been merged to main:
git branch --merged main | Foreach-object { if($_.SubString(0,1) -ne '*'){ git branch -d $_.SubString(2);} }
#requires -version 5.1 | |
<# | |
Based on a function from https://gist.github.com/dhmacher/2203582502c7ab13015db8f52e94da45 | |
You need an access token that has at least write access to your status | |
* go to settings -> Development | |
* Click "New Application" | |
* Enter a name |