Azure DevOps/VSTS始终报告"DETACHED HEAD"在干净的存储库上 [英] Azure DevOps/VSTS always reports "DETACHED HEAD" on a clean repository

查看:70
本文介绍了Azure DevOps/VSTS始终报告"DETACHED HEAD"在干净的存储库上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友

我现在对Azure DevOps/VSTS感到厌倦.詹金斯(Jenkins)更好,现在仍然如此,只是我的组织想要使用Azure DevOps.

I am now getting tired of Azure DevOps/VSTS. Jenkins was much better and still is, just my organization wants to use Azure DevOps.

我有一个谜需要解决.

以下是我从笔记本电脑中回购的东西,它没有未跟踪或未提交的更改.

The following is the out of my repo from my laptop, it has no untracked or uncommitted changes.

git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

git remote -v
origin  https://github.com/xxx/terraformvsts.git (fetch)
origin  https://github.com/xxx/terraformvsts.git (push)

猜猜是什么,Azure Devops总是抱怨在每次生成执行时都具有"DETACHED HEAD".

Guess, what, Azure Devops always complains that it has "DETACHED HEAD" , at every build execution.

请注意结帐"阶段的以下内容:

Note the following from "Checkout" phase:

2019-02-05T05:55:33.2076875Z Note: checking out 'aad90fceecf39a7731c356ebfe2b547ddbce99e6'.
2019-02-05T05:55:33.2076992Z 
2019-02-05T05:55:33.2077872Z You are in 'detached HEAD' state. You can look around, make experimental
2019-02-05T05:55:33.2077939Z changes and commit them, and you can discard any commits you make in this
2019-02-05T05:55:33.2078179Z state without impacting any branches by performing another checkout.
2019-02-05T05:55:33.2078345Z 
2019-02-05T05:55:33.2078389Z If you want to create a new branch to retain commits you create, you may
2019-02-05T05:55:33.2078683Z do so (now or later) by using -b with the checkout command again. Example:
2019-02-05T05:55:33.2078717Z 
2019-02-05T05:55:33.2078933Z   git checkout -b <new-branch-name>
2019-02-05T05:55:33.2078966Z 
2019-02-05T05:55:33.2079004Z HEAD is now at aad90fc Clean Repository

Build管道的结帐阶段如下:

The checkout phase for Build pipeline is like below:

如何解决此问题?我不应该结帐吗?还是应该修改构建"管道中的配置设置之一?

How to resolve this issue? should I not do checkout? or one of the config settings in the Build pipelines should be amended?

推荐答案

这不是抱怨,这就是Azure DevOps的工作方式.我在所有版本和所有存储库上都看到了.没有错.

It's not complaining, this is how Azure DevOps works. I see on all builds, on all repos. nothing is wrong.

这篇关于Azure DevOps/VSTS始终报告"DETACHED HEAD"在干净的存储库上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆