Skip to content

Commit 8e11b98

Browse files
committed
choose last branch in git config
1 parent 900562f commit 8e11b98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: Modules/Scripts/Update-Gits.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ Begin
7373
$a = Get-Content .\.git\config | Select-String -Pattern '^\[branch "(.+)"\]$'
7474
if ($a.Matches.Success)
7575
{
76-
return $a.Matches.Groups[1].Value
76+
# presume last branch is current
77+
return $a.Matches.Groups[$a.Matches.Count].Value
7778
}
7879

7980
return 'main'

0 commit comments

Comments
 (0)