我有一个可用的git存储库。但是,在键入gitbranch-a时,我错过了remotes/origin/HEAD->origin/master。为什么HEAD丢失了?如何将丢失的HEAD添加到我的存储库中? 最佳答案 原答案:来源的HEAD仅在您克隆存储库时获取。如果您以其他方式添加Remote(例如,通过使用gitremoteadd或通过重命名另一个现有Remote),此引用将不存在,因为没有理由拥有它。远程repo应该是barerepos在大多数情况下,在裸repo中HEAD仅指向“默认”分支。这只在一次相关:克隆时。因此,克隆
我有一个可用的git存储库。但是,在键入gitbranch-a时,我错过了remotes/origin/HEAD->origin/master。为什么HEAD丢失了?如何将丢失的HEAD添加到我的存储库中? 最佳答案 原答案:来源的HEAD仅在您克隆存储库时获取。如果您以其他方式添加Remote(例如,通过使用gitremoteadd或通过重命名另一个现有Remote),此引用将不存在,因为没有理由拥有它。远程repo应该是barerepos在大多数情况下,在裸repo中HEAD仅指向“默认”分支。这只在一次相关:克隆时。因此,克隆
我检查了相关线程,但仍然无法弄清楚幕后发生了什么。当我输入gitremoteshoworigin时,我得到:*remoteoriginFetchURL:xxxxPushURL:xxxxHEADbranch(remoteHEADisambiguous,maybeoneofthefollowing):developmentmasterRemotebranches:developmenttrackedmastertrackedLocalbranchesconfiguredfor'gitpull':developmentmergeswithremotedevelopmentmastermerg
我检查了相关线程,但仍然无法弄清楚幕后发生了什么。当我输入gitremoteshoworigin时,我得到:*remoteoriginFetchURL:xxxxPushURL:xxxxHEADbranch(remoteHEADisambiguous,maybeoneofthefollowing):developmentmasterRemotebranches:developmenttrackedmastertrackedLocalbranchesconfiguredfor'gitpull':developmentmergeswithremotedevelopmentmastermerg
我正在使用Git。我对我创建的分支做了一些更改,然后我提交了一些更改。但是现在,当我尝试提交代码时,我收到以下消息:Warning:notalllocalchangesmaybeshownduetoanerror:Thestring'HEAD'doesnotrepresentarevisionnumber.此外,当我查看IntelliJIDEA12.1.6中的本地更改列表时以下消息出现在列表下方:Errorupdatingchanges:Thestring'HEAD'doesnotrepresentarevisionnumber我很乐意在这方面得到一些帮助。我用谷歌搜索了这个问题,但没
我正在使用Git。我对我创建的分支做了一些更改,然后我提交了一些更改。但是现在,当我尝试提交代码时,我收到以下消息:Warning:notalllocalchangesmaybeshownduetoanerror:Thestring'HEAD'doesnotrepresentarevisionnumber.此外,当我查看IntelliJIDEA12.1.6中的本地更改列表时以下消息出现在列表下方:Errorupdatingchanges:Thestring'HEAD'doesnotrepresentarevisionnumber我很乐意在这方面得到一些帮助。我用谷歌搜索了这个问题,但没
*[971f835](HEAD,original_idea)Nowworkinghere.Somecomment9*[692b673]Somecomment8*[3ebff62]Revertedtooriginalidea.Somecomment7|*[72ea01d](master)Decideditwasn'tworththeeffort.Somecomment6|*[985c1ad]Somecomment5|*[4d7d491]Somecomment4|*[0c697bb]Branchedtotryanidea.Somecomment3|/*[7280b1f]Somecommen
*[971f835](HEAD,original_idea)Nowworkinghere.Somecomment9*[692b673]Somecomment8*[3ebff62]Revertedtooriginalidea.Somecomment7|*[72ea01d](master)Decideditwasn'tworththeeffort.Somecomment6|*[985c1ad]Somecomment5|*[4d7d491]Somecomment4|*[0c697bb]Branchedtotryanidea.Somecomment3|/*[7280b1f]Somecommen
当我克隆我的git存储库时,其中一个子模块位于一个名称奇怪的分支中,我认为这意味着它有一个“分离的头”(我什至不确定那是什么意味着)。如果我检查子模块的主分支,然后运行“gitsubmoduleupdate--init--recursive”它再次发生。有人知道这是怎么回事吗? 最佳答案 子模块总是作为分离的HEADcheckout(参见“Whydidgitdetachmyhead?”),因为父仓库的索引仅包含SHA1作为specialentryinitsindex,正如GaryFixler所解释的那样的answer.即使你conf
当我克隆我的git存储库时,其中一个子模块位于一个名称奇怪的分支中,我认为这意味着它有一个“分离的头”(我什至不确定那是什么意味着)。如果我检查子模块的主分支,然后运行“gitsubmoduleupdate--init--recursive”它再次发生。有人知道这是怎么回事吗? 最佳答案 子模块总是作为分离的HEADcheckout(参见“Whydidgitdetachmyhead?”),因为父仓库的索引仅包含SHA1作为specialentryinitsindex,正如GaryFixler所解释的那样的answer.即使你conf