gpt4 book ai didi

Git 分支嵌套自身

转载 作者:行者123 更新时间:2023-12-04 08:48:44 25 4
gpt4 key购买 nike

当我将此分支推送到远程时,我有一个本地 git 分支。我看到我的本地分支嵌套在远程分支上:
本地分行架构:

source_code
|
|- images
|- fonts
|- index.html
远程分支结构:
source_code
|
|- images
|- fonts
|- index.html
|- source_code
|- images
|- fonts
|- index.html

当我尝试 pull 它时,我在本地分支上看不到这个文件夹。
我不确定,是什么导致了这个问题。任何人都可以帮我解决这个问题,在此先感谢。

最佳答案

你的目录结构

source_code
|
|- images
|- fonts
|- index.html
|- source_code (*)
|- images
|- fonts
|- index.html
因为有人在复制(或 Ctrl + 拖放)或其他错误时出错。解决方法:删除文件夹 source_code (*), 然后
git add .
git commit -m"Remove unnecessary folder"
git push -v
一切都会好的。

关于Git 分支嵌套自身,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64179828/

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