营销型网站建设_做网站,wordpress菜单添加链接,wordpress极客式主题,四平网站制作找回csdn帐号了#xff0c;计划陆续开始更新最近的笔记√ 没想到很久没登还有人在看 问题描述
git 查看项目远程分支#xff1a;
git branch -r返回结果很少。但GitHub页面上能看到很多的分支。
尝试git remote update#xff0c;发现结果仍然如此。
PS C:\Users\dell\g… 找回csdn帐号了计划陆续开始更新最近的笔记√ 没想到很久没登还有人在看 问题描述
git 查看项目远程分支
git branch -r返回结果很少。但GitHub页面上能看到很多的分支。
尝试git remote update发现结果仍然如此。
PS C:\Users\dell\go\src\k8s.io\kubernetes git remote update
remote: Enumerating objects: 1334961, done.
remote: Counting objects: 100% (1334920/1334920), done.
...
Resolving deltas: 100% (981759/981759), completed with 7193 local objects.
From https://github.com/kubernetes/kubernetes49768134e52..160fe010f32 master - origin/master* [new tag] v0.10.0 - v0.10.0* [new tag] v0.11.0 - v0.11.0
...* [new tag] v1.9.0-alpha.3 - v1.9.0-alpha.3
PS C:\Users\dell\go\src\k8s.io\kubernetes git branch -rorigin/HEAD - origin/masterorigin/master原因分析
当初拉取项目时使用了 git clone --depth1 ...
If you clone with the --depth parameter, it sets .git/config not to fetch all branches, but only master.
解决方法
在项目的 .git/config 文件中修改一行
You can simply omit the parameter or update the configuration file from / 找到这一行
fetch refs/heads/master:refs/remotes/origin/masterto / 改成
fetch refs/heads/*:refs/remotes/origin/*Ref
https://git-scm.com/book/en/v2/Git-Internals-The-Refspec