gpt4 book ai didi

SCSS 。远程 HEAD 不明确

转载 作者:IT王子 更新时间:2023-10-29 01:08:47 27 4
gpt4 key购买 nike

我检查了相关线程,但仍然无法弄清楚幕后发生了什么。

当我输入 git remote show origin 时,我得到:

* remote origin
Fetch URL: xxxx
Push URL: xxxx
HEAD branch (remote HEAD is ambiguous, may be one of the following):
development
master
Remote branches:
development tracked
master tracked
Local branches configured for 'git pull':
development merges with remote development
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)

我还检查了 git show-ref,我得到了:

3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/development
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/master
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/development
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/master

这是我通过执行 git branch -a 得到的所有分支的列表:

  development
* master
remotes/origin/development
remotes/origin/master

这是 .git/config 中的内容:

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
hideDotFiles = dotGitOnly
autocrlf = false
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = xxxx
push = refs/heads/master:refs/heads/master
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "development"]
remote = origin
merge = refs/heads/development

看来remote development和master分支共享同一个节点。我该如何解决这个歧义问题?

最佳答案

您的远程仓库没有任何问题。 git 告诉您“远程 HEAD 不明确”,因为 master 和 development 都具有相同的 SHA1 哈希。如果您刚刚从 master 分支开发,那就应该是这样。

尝试将某些东西提交给掌握或开发,并将其推向原点; “模棱两可”的消息将消失,您刚刚提交的任何分支都将成为远程 HEAD 分支。

关于 SCSS 。远程 HEAD 不明确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2832269/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com