gpt4 book ai didi

windows - 如何在 Windows 上正确克隆 --recursive git 存储库?

转载 作者:可可西里 更新时间:2023-11-01 11:47:50 26 4
gpt4 key购买 nike

如何在 Windows 上正确克隆 --recursive git 存储库?

我的 git 版本是:

git --version
git version 2.8.2

当我使用此命令行使用 --recursive 克隆存储库时:
git clone --recursive https://github.com/evandrocoan/SublimeTextStudio.git "D:/User/Dropbox/Applications/SoftwareVersioning/SublimeText/Data/Packages"

这是控制台输出:(一切正常,没有错误)

D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText>git clone --recursive https://github.com/evandrocoan/SublimeTextStudio.git "D:/User/Dropbox/Applications/SoftwareVersioning/Su
blimeText/Data/Packages"
Cloning into 'D:/User/Dropbox/Applications/SoftwareVersioning/SublimeText/Data/Packages'...
remote: Counting objects: 827, done.
remote: Compressing objects: 100% (244/244), done.
remote: Total 827 (delta 139), reused 0 (delta 0), pack-reused 563eceiving objects:
Receiving objects: 100% (827/827), 3.64 MiB | 691.00 KiB/s, done.
Resolving deltas: 100% (452/452), done.
Checking connectivity... done.
Submodule 'ANSIescape' (https://github.com/evandrocoan/SublimeANSI) registered for path 'ANSIescape'
Submodule 'BBCode' (https://github.com/evandrocoan/BBCode) registered for path 'BBCode'
Submodule 'Boxy Theme' (https://github.com/evandrocoan/st-boxy) registered for path 'Boxy Theme'
Submodule 'Package Control' (https://github.com/evandrocoan/package_control) registered for path 'Package Control'
Submodule 'SideBarEnhancements' (https://github.com/evandrocoan/SideBarEnhancements) registered for path 'SideBarEnhancements'
Submodule 'SublimeAmxxPawn' (https://github.com/evandrocoan/SublimeAmxxPawn) registered for path 'SublimeAmxxPawn'
Submodule 'SublimeNotepadPlusPlusTheme' (https://github.com/evandrocoan/SublimeNotepadPlusPlusTheme) registered for path 'SublimeNotepadPlusPlusTheme'
Submodule 'SublimeTextToolBar' (https://github.com/evandrocoan/SublimeTextToolBar) registered for path 'SublimeTextToolBar'
Submodule 'Theme - SoDaReloaded' (https://github.com/evandrocoan/SoDaReloaded-Theme) registered for path 'Theme - SoDaReloaded'
Submodule 'Theme - Soda' (https://github.com/evandrocoan/soda-theme) registered for path 'Theme - Soda'
Cloning into 'ANSIescape'...
remote: Counting objects: 200, done.
Receiving objects: 3% (6/200)remote: Total 200 (delta 0), reused 0 (delta 0), pack-reused 200
Receiving objects: 100% (200/200), 45.36 KiB | 0 bytes/s, done.
Resolving deltas: 100% (120/120), done.
Checking connectivity... done.
Submodule path 'ANSIescape': checked out 'd93f5ce408a28252c73d11a5b0b1b456162e8bac'
Cloning into 'BBCode'...
remote: Counting objects: 86, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 86 (delta 4), reused 0 (delta 0), pack-reused 74
Unpacking objects: 100% (86/86), done.
Checking connectivity... done.
Submodule path 'BBCode': checked out '51d4813dc2e7a99e2c8afa5ce1cf71bbebf1a88d'
Cloning into 'Boxy Theme'...
remote: Counting objects: 13403, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 13403 (delta 28), reused 0 (delta 0), pack-reused 13345
Receiving objects: 100% (13403/13403), 6.84 MiB | 410.00 KiB/s, done.
Resolving deltas: 100% (7243/7243), done.
Checking connectivity... done.
Submodule path 'Boxy Theme': checked out 'f5c8f1dd3f69df64ca0cd45dbd8f25456fc53e58'
Cloning into 'Package Control'...
remote: Counting objects: 4950, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 4950 (delta 43), reused 0 (delta 0), pack-reused 4877
Receiving objects: 100% (4950/4950), 1.73 MiB | 643.00 KiB/s, done.
Resolving deltas: 100% (3476/3476), done.
Checking connectivity... done.
Submodule path 'Package Control': checked out '5195e29c0a8e12913d1fb7aaaf1370942d7f2409'
Cloning into 'SideBarEnhancements'...
remote: Counting objects: 1506, done.
remote: Total 1506 (delta 0), reused 0 (delta 0), pack-reused 1506
Receiving objects: 100% (1506/1506), 468.76 KiB | 517.00 KiB/s, done.
Resolving deltas: 100% (940/940), done.
Checking connectivity... done.
Submodule path 'SideBarEnhancements': checked out '3c7957f2446b442931c3731358a79750687059d2'
Cloning into 'SublimeAmxxPawn'...
remote: Counting objects: 287, done.
remote: Compressing objects: 100% (123/123), done.
remote: Total 287 (delta 164), reused 282 (delta 159), pack-reused 0
Receiving objects: 100% (287/287), 149.52 KiB | 0 bytes/s, done.
Resolving deltas: 100% (164/164), done.
Checking connectivity... done.
Submodule path 'SublimeAmxxPawn': checked out 'df13519f98d3278fc025d01d3f39ff8ae2ff64a7'
Cloning into 'SublimeNotepadPlusPlusTheme'...
remote: Counting objects: 163, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 163 (delta 1), reused 0 (delta 0), pack-reused 157
Receiving objects: 100% (163/163), 33.82 KiB | 0 bytes/s, done.
Resolving deltas: 100% (65/65), done.
Checking connectivity... done.
Submodule path 'SublimeNotepadPlusPlusTheme': checked out '4cbca8d3717c4232ea4783579d82c45127623666'
Cloning into 'SublimeTextToolBar'...
remote: Counting objects: 48, done.
remote: Total 48 (delta 0), reused 0 (delta 0), pack-reused 48
Unpacking objects: 100% (48/48), done.
Checking connectivity... done.
Submodule path 'SublimeTextToolBar': checked out '04d97345937a9181b95c3b326ed1acc1bda60637'
Cloning into 'Theme - SoDaReloaded'...
remote: Counting objects: 1411, done.
remote: Total 1411 (delta 0), reused 0 (delta 0), pack-reused 1411eceiving objects
Receiving objects: 100% (1411/1411), 5.60 MiB | 424.00 KiB/s, done.
Resolving deltas: 100% (703/703), done.
Checking connectivity... done.
Submodule path 'Theme - SoDaReloaded': checked out 'ff9967a98734fc8f46e07bc7cb86115d325c9225'
Cloning into 'Theme - Soda'...
remote: Counting objects: 3156, done.
remote: Total 3156 (delta 0), reused 0 (delta 0), pack-reused 3156
Receiving objects: 100% (3156/3156), 5.70 MiB | 366.00 KiB/s, done.
Resolving deltas: 100% (1157/1157), done.
Checking connectivity... done.
Submodule path 'Theme - Soda': checked out 'd47df56b20741eda7ada4d1ed7e730bc4203b0d3'

D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText>

所有子模块都在 .git 文件中,而不是 .git 文件夹中,包含其 git 信息:

Imgur

那个.git文件内容是:

gitdir: /cygdrive/d/User/Dropbox/Applications/SoftwareVersioning/SublimeText/Data/Packages/.git/modules/SublimeNotepadPlusPlusTheme

该文件可能应该是一个 Linux 符号链接(symbolic link),但在 Windows 上毫无值(value)。这绝对是一件可怕的事情,因为 Main 存储库文件夹仅在上面一层。它应该与 ../ 相关。

在文件夹 Data/Packages/.git/modules/ 上,我得到了所有子模块 .git 文件夹:

Imgur

当我用 Smartgit 打开主存储库时,它会将我所有克隆的子模块显示为未找到:

Imgur

最佳答案

Cygwin git 更喜欢 posix 路径,所以而不是

git clone --recursive https://github.com/evandrocoan/SublimeTextStudio.git "D:/User/Dropbox/Applications/SoftwareVersioning/SublimeText/Data/Packages"

你应该试过:

git clone --recursive https://github.com/evandrocoan/SublimeTextStudio.git "/Cygdrive/d/User/Dropbox/Applications/SoftwareVersioning/SublimeText/Data/Packages"

结果有一个.git文件夹。

Packages/.git
Packages/.git/hooks
Packages/.git/info
Packages/.git/logs
Packages/.git/logs/refs
Packages/.git/logs/refs/heads
Packages/.git/logs/refs/remotes
Packages/.git/logs/refs/remotes/origin
Packages/.git/modules
Packages/.git/modules/ANSIescape
Packages/.git/modules/ANSIescape/hooks
Packages/.git/modules/ANSIescape/info
Packages/.git/modules/ANSIescape/logs
...
Packages/.git/modules/Theme - SoDaReloaded/refs/tags
Packages/.git/objects
Packages/.git/objects/info
Packages/.git/objects/pack
Packages/.git/refs
Packages/.git/refs/heads
Packages/.git/refs/remotes
Packages/.git/refs/remotes/origin
Packages/.git/refs/tags
Packages/.githooks

无论如何,当您正在寻找与 Windows 应用程序兼容的 git 存储库(如 SmartGit)时,您需要使用 Windows 版本的 Git。正如您已经发现的那样。

关于windows - 如何在 Windows 上正确克隆 --recursive git 存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39691007/

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