Use upstream information to calculate the local default branch
Use upstream information to calculate the local default branch

This commit changes the logic that calculates the local default branch to use the remote tracking branch of local branches if they exist, this allows us to detect e.g `main` as the default branch if it is tracking `master` in the remote repository when `master` is the default branch in GitHub

j-f1/forked-desktop,desktop/desktop,desktop/desktop,shiftkey/desktop,artivilla/desktop,artivilla/desktop,artivilla/desktop,kactus-io/kactus,j-f1/forked-desktop,shiftkey/desktop,desktop/desktop,say25/desktop,j-f1/forked-desktop,kactus-io/kactus,kactus-io/kactus,shiftkey/desktop,say25/desktop,artivilla/desktop,say25/desktop,kactus-io/kactus,desktop/desktop,shiftkey/desktop,j-f1/forked-desktop,say25/desktop