These trick assumes you have a remote named 'origin'
Website version with 'copy to clipboard' buttons
git fetch --prune | git branch -r | grep -v 'main' | sed 's/origin\///' | sed 's/^[ \t]*//;s/[ \t]*$//' | xargs -L1 git push origin --delete
git branch | grep -v 'main' | grep -v 'other-branch' | xargs -L1 git branch -D
git branch | grep -v 'main' | xargs -L1 git branch -D
Replace 'raph' with your name here
git for-each-ref --format=' %(authorname),%(refname)' | grep -i 'raph'
git branch -r | grep 'origin/feature/deployable' | sed 's/origin\///' | xargs -I {} git push origin --delete {}
git init; (Invoke-WebRequest https://raw.githubusercontent.com/github/gitignore/main/VisualStudio.gitignore -UseBasicParsing).Content | Out-File -FilePath .gitignore -Encoding utf8; git add -A
git branch --merged origin/main | Where-Object { !$_.Contains('main') } | ForEach-Object { git branch -d $_.trim() }
git branch | Where-Object { !$_.Contains('main') } | ForEach-Object { git branch -D $_.Trim() }
(git branch | Where-Object { $_.Contains('*') } | Select-Object -First 1).Trim('*').Trim() | Set-Clipboard
git fetch --prune --all; git branch -r | where-object {$_.Contains('add a filter here')} | ForEach-Object { git push origin --delete $_.Split('/')[1] }
Just replace 'Raph' with your name here
git for-each-ref --format=' %(authorname),%(refname)' | where-object { $_.Split(',')[0].Trim() -eq 'Raph' } | select-object { $_.Split(',')[1] }
git status | Where-Object {$_.Contains('modified') -and !$_.Contains('.config')} | ForEach-Object { git add $_.Replace('modified:','').Trim() }
git fetch --prune; git branch -r | Where-Object { !$_.Contains('main') } | ForEach-Object { git push origin --delete $_.Split('/')[1] }
git fetch --prune; git branch -r --merged origin/main | Where-Object { !$_.Contains('main') } | ForEach-Object { git push origin --delete $_.Split('/')[1] }
gci -Directory | foreach {Push-Location $_.Name; git fetch --all; git add .; git stash; git checkout main; git pull; Pop-Location}