早安,
我的本地网络存储库遇到问题。
Bare存储库放在我的台式计算机上,共享文件夹git
中的路径为//my_pc_name/git/MyProject.git
。我可以成功地从下面的网络路径执行git clone
到我的电脑中的任意文件夹,并且(我使用GitExtensions软件)签到当前分支。
1)相反,当我的大学尝试执行清除git clone
时,GitExtentions会显示以下错误消息:
"C:\Program Files\Git\bin\git.exe" clone -v --recurse-submodules --progress //my_pc_name/git/MyProject.git" "D:/my_project_temp"
Cloning into 'D:/my_project_temp'...
done.
fatal: unable to read tree b3b9bc318a0805d071148437a2642eaa0324c809
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Done
Press Enter or Esc to close console...
命令status
给出以下消息:
$ git status
fatal: unable to read tree b3b9bc318a0805d071148437a2642eaa0324c809
尝试log
:
$ git log --oneline
error: refs/remotes/origin/2222M does not point to a valid object! 09e483a (HEAD -> master, origin/master, origin/HEAD) Fix API call error: Could not read 03f460a00faeb915552e2edc1b812ba2d8d31802 fatal: Failed to traverse parents of commit 0a66a7284bb9279d9404d55b1b480a6f28259511
2)在另一台机器上尝试git fetch
或git pull
时:
"C:\Program Files\Git\bin\git.exe" pull --progress "origin"
fatal: oops (d5d2673a720f6d132938b8d21a124c4284b915a0)
fatal: the remote end hung up unexpectedly
Done
Press Enter or Esc to close console...
和另一个:
"C:\Program Files\Git\bin\git.exe" remote update
Fetching origin
fatal: git upload-pack: not our ref 03f460a00faeb915552e2edc1b812ba2d8d31802
error: Could not fetch origin
Done
Press Enter or Esc to close console...
3)我试图通过帮助git clone -l --bare d:\path_to_local_repo d:\git\shared_repos_path\test.git
的命令创建另一个bare仓库。可以,从这个新的裸仓库git clone d:\git\shared_repos_path\test.git d:\path_to_new_loning_repo
克隆,也可以。但是我的大学仍然无法从这所大学中克隆出来。
我不知道我如何破坏我的仓库。
Solution:我只是与大学分享我的.git
本地存储库,并且可以解决我的问题。是的,它的normal:
... Git给每个开发人员一个完整的开发历史记录的本地副本,并且更改从一个这样的存储库复制到另一个。这些更改将作为添加的开发分支导入,并且可以以与本地开发分支相同的方式合并。
最佳规则。