dahlbyk / posh-git

A PowerShell environment for Git
http://dahlbyk.github.io/posh-git/
MIT License
7.62k stars 802 forks source link

Update-AllBranches defaults to master #919

Open Bladehawke opened 2 years ago

Bladehawke commented 2 years ago

System Details

Issue Description

This is as much a question as an issue. All repositories created in the last two years on GitHub (and many more have changed to) use 'main' as the default branch, however Update-AllBranches defaults to 'master'. Is there a reasonable way to make the default something like the result of (git branch --remote --list '*/HEAD') -split '/' | select -last 1. This would, theoretically, allow for master branches named stage or jabberwocky or any manner of strangeness that the repository owner chose