Use `/b` to find the default branch, instead of start/end of line
parent
a14d9cb6ea
commit
98bd0ae149
|
|
@ -199,7 +199,7 @@ function gdv() {
|
|||
}
|
||||
|
||||
function get_default_branch() {
|
||||
if git branch | grep -q '^main$'; then
|
||||
if git branch | grep -q '\main\b'; then
|
||||
echo main
|
||||
else
|
||||
echo master
|
||||
|
|
|
|||
Loading…
Reference in New Issue