-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nbgv install
should create a version.json file, observing the default branch name
#717
Comments
Do you mean it should use the init.defaultBranch setting from git config? |
Maybe. I hadn't figured out yet how it would be accomplished. |
I guess for a git repo with no remotes, there is no "default" branch. It's just a bunch of branches. When it was new, there was only one branch, of course, but if there is more than one branch I guess it's impossible to say for sure. So perhaps an algorithm like this:
|
If the repo has remotes already then the |
Ultimately the remote's default branch should win, but you gotta pick the right one. By convention And you're right, my algorithm isn't fool proof. I just updated it based on your feedback but at the end of the day, it's a best effort. |
In new git repos, the default branch name may be
main
(or develop, etc) butnbgv install
will create a version.json file whosepublicReleaseRefSpec
makesmaster
the first public release branch regardless of the name of the default branch.The text was updated successfully, but these errors were encountered: