dswisher / git-updater

Tool to help manage multiple git repositories
MIT License
0 stars 0 forks source link

Status should check branch #7

Closed dswisher closed 1 year ago

dswisher commented 2 years ago

If the current branch is not the "default" branch, that should be reported by the status command.

Implementing this requires determining what the default branch should be. In the case of github, there is the notion of a default branch. To get that, look at the remote for local branches (master, main, develop) (needs this git-exec-wrapper enhancement) and then get the default branch for that remote (needs this git-exec-wrapper enhancement).

dswisher commented 2 years ago

Thinking more about this, the branch info only needs to be examined if there are multiple remotes. If there is just one remote, then just get the default branch for that remote.