-
Notifications
You must be signed in to change notification settings - Fork 651
BUG: Could not find a 'develop' or 'master' branch, neither locally nor remotely #1049
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
Comments
I found in bitbucket that when it does a clone passing branch as command line arg, git clone result does not create neither master or develop branch and thus GitVersion is unable to find local branch. mode: ContinuousDeployment
branches:
master:
regex: (^master$|^origin\/master$)
develop:
regex: (^dev(elop)?(ment)?$|^origin\/dev(elop)?(ment)?$) This solved the issue in question. |
thanks for this! i would've never checked default configuration because of the error message below
in my case the jenkins git-plugin did fetch all remote refs, it just did not create local branches tracking remote ones. I figured this should've been sufficient, given the above error message.. after the update to the regex outlined above, it is. Maybe this should be the actual default configuration unless i'm missing something ( and i may be .. ) |
Yep, indeed it seems like it should. A PR changing the default regex and adding a new test for |
On second thought.. can you think of no use case where someone would depend on these Maybe this is as simple as the exception message not assuming any kind of particular configuration and just guiding the user towards the config keys that were used to draw this conclusion, e.g. |
Those are good points, @andlaz. But I think we can base GitVersion's assumptions on Git's defaults, which is to name the default branch |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
I've come across this problem recently, and the regex solution works fine. I wonder if the |
That's a great idea, @joaosantana. Pull requests are welcome! 🙏🏼 |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
Guys,
I have a very strange problem...
System.InvalidOperationException: Could not find a 'develop' or 'master' branch, neither locally nor remotely
is the message I get when trying to build a pull request. From either MASTER or a topic branch this all works perfectly.Why might this be happening?
I have attached the full log and you can see it finds tags and lists the graph...
GitVersion-Log.txt
The text was updated successfully, but these errors were encountered: