git - Azure devops GitVersion 任务失败

标签 git azure azure-devops gitversion

截至本周,我注意到,在 azure devops 中创建新存储库时,“master”分支不再存在,而是被“main”分支取代。

当我为新存储库配置管道时,我使用 GitVersion 任务,我一直用该任务在 azure devops 中对我的工件进行版本控制,但自从进行此更改后,我收到以下错误:

System.InvalidOperationException: Could not find a 'develop' or 'master' branch, neither locally nor remotely.

有人知道我该如何解决这个问题吗?

非常感谢您的支持。

最佳答案

是的,git 生态系统中的许多工具或服务正在不再将“master”作为默认分支: https://devblogs.microsoft.com/devops/azure-repos-default-branch-name/

实际上没有 GitVersion 版本支持这个新分支名称。

参见https://github.com/GitTools/GitVersion/issues/2433

有修复https://github.com/GitTools/GitVersion/pull/2367

所以你有两种可能性:

关于git - Azure devops GitVersion 任务失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65132584/

相关文章:

javascript - 在复杂的 UI 更改中使用功能标志

azure - 由于 netcore 3.1.4 安全补丁,Azure 中出现错误

linux - 在 Azure DevOps Pipeline 中提供 SSH 私钥的最佳方式是什么?

python - 将 python 算法的多个 git 项目分支 merge 为一个

git - 无法使用 CLI 登录到 heroku

sql-server - 如何检查Azure SQL数据库中是否已存在数据库用户

javascript - 使用常用方法将“替换为”在 JavaScript Azure Function 中不起作用

azure - 如何将构建工件移动到当前工作目录

git - merge 时避免vi "PopUp"

iis - Azure:如何执行延迟的启动任务?