我克隆了一个Git存储库,它包含大约五个分支.但是,当我这样做时,git branch我只看到其中一个:
$ git branch
* master
Run Code Online (Sandbox Code Playgroud)
我知道我可以git branch -a看到所有分支,但是我如何在本地拉出所有分支,所以当我这样做时git branch,它显示以下内容?
$ git branch
* master
* staging
* etc...
Run Code Online (Sandbox Code Playgroud) git尝试克隆存储库一段时间后,我的客户端一再失败并出现以下错误.
这可能是什么问题?
注意:我已经向GIT托管服务提供商注册了我的SSH密钥
Receiving objects: 13% (1309/10065), 796.00 KiB | 6 KiB/s
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud) git pull --help 说:
在默认模式下,git pull是git fetch的简写,后跟git merge FETCH_HEAD.
这是什么FETCH_HEAD,以及实际合并期间git pull?
我有一个git存储库驻留在内存有限的服务器上.当我尝试从服务器克隆现有存储库时,我收到以下错误
hemi@ubuntu:$ git clone ssh://hemi@servername.dk/home/hemi/repos/articles
Initialized empty Git repository in /home/hemi/Skrivebord/articles/.git/
hemi@servername.dk's password:
remote: Counting objects: 666, done.
remote: warning: suboptimal pack - out of memory
remote: fatal: Out of memory, malloc failed
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
hemi@ubuntu:$
Run Code Online (Sandbox Code Playgroud)
为了处理这个错误,我试图重新打包原始存储库(根据此论坛帖子).但是,它不是重新打包存储库,而是描述了如何使用"git pack-objects"命令.
hemi@servername:~/repos/articles$ git repack -a -d …Run Code Online (Sandbox Code Playgroud) 所以我创建了一个不是裸的远程仓库(因为我需要redmine才能读取它),并且它被设置为与组共享(所以git init --shared = group).我能够推送到远程仓库,现在我正在尝试克隆它.
如果我通过网络克隆它,我得到这个:
remote: Counting objects: 4648, done.
remote: Compressing objects: 100% (2837/2837), done.
error: git-upload-pack: git-pack-objects died with error.B/s
fatal: git-upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
我能够在没有问题的情况下在本地克隆它,我运行了"git fsck",它只报告了一些悬空树/ blob,我明白这不是问题.可能是什么导致了这个?我仍然可以从中拉出来,而不是克隆.我应该注意远程git版本是1.5.6.5而本地版本是1.6.0.4
我尝试克隆我的本地副本的repo,剥离.git文件夹并推送到一个新的repo,然后克隆新的repo,我得到相同的错误,这让我相信它可能是repo中的一个文件导致git-upload-pack失败...
编辑:我在repo中有很多windows二进制文件,因为我只是构建了python模块,然后将它们放在那里,所以其他所有人都不需要构建它们.如果我删除windows二进制文件并推送到一个新的repo,我可以再次克隆,也许这给了一个线索.试图缩小目前导致问题的确切文件.
我在git上克隆一个repo时遇到了麻烦.我已经尝试了几天并且已经尝试了很多解决方案(在大多数情况下问题略有不同但似乎适用)但是没有做任何事情来做出改变.
我已经尝试关闭防病毒和防火墙,但这没有帮助.我也尝试卸载并重新安装网络适配器驱动程序(并重新启动计算机),但这不起作用.
根据我的理解,这是一个网络问题,因为远程服务器一直在挂断,但我无法解决任何问题.
使用git clone -v --progress似乎提供与git clone相同的输出.git clone输出-v --progress https://github.com/mit-cml/appinventor-sources.git
克隆到'appinventor-sources'...
POST git-upload-pack(gzip 1425到774字节)
remote:计数对象:41649,完成.
remote:压缩对象:100%(7/7),完成.
错误:RPC失败; curl 56 OpenSSL SSL_read:SSL_ERROR_SYSCALL,错误10054
致命:远程端意外
致命致命:早期EOF
致命:索引包失败
我现在尝试再次增加缓冲区
git config --global http.postBuffer 1048576000
但仍然没有.
我正在关注远程端的解决方案意外挂起,同时git克隆进行故障排除.
详细信息:
Username for 'https://xiangwan.visualstudio.com': xiangwan
Password for 'https://xiangwan@xiangwan.visualstudio.com':
Counting objects: 85, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (58/58), done.
Writing objects: 100% (63/63), 20.67 KiB | 0 bytes/s, done.
Total 63 (delta 26), reused 1 (delta 0)
error: RPC failed; result=56, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)
git config http.postBuffer 524288000,仍然是错误;我所有的Jenkins构建都在失败git fetch.
它失败了 git fetch --tags --progress git@bitbucket.org:ethenwilson/whentoact.git
Started by user anonymous
Building in workspace /Users/ethen/.jenkins/workspace/Build NikNik
> git rev-parse --is-inside-work-tree
Fetching changes from the remote Git repository
> git config remote.origin.url git@bitbucket.org:ethenwilson/whentoact.git
Fetching upstream changes from git@bitbucket.org:ethenwilson/whentoact.git
> git --version
using GIT_SSH to set credentials NikNik BitBucket SSH Key
> git fetch --tags --progress git@bitbucket.org:ethenwilson/whentoact.git +refs/heads/*:refs/remotes/origin/*
FATAL: Failed to fetch from git@bitbucket.org:ethenwilson/whentoact.git
hudson.plugins.git.GitException: Failed to fetch from git@bitbucket.org:ethenwilson/whentoact.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:622)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:854)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:879)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
at …Run Code Online (Sandbox Code Playgroud) 我有一个很有趣的问题。我尝试通过 bash 将一些项目发送到 repo,最近发送时出现问题。
Enumerating objects: 27, done. Counting objects: 100% (27/27), done. Delta compression using up to 16 threads Compressing objects: 100% (24/24), done. Writing objects: 100% (25/25), 187.79 KiB | 9.39 MiB/s, done. Total 25 (delta 1), reused 0 (delta 0), pack-reused 0 send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly
有趣的是,我可以提前 10 分钟发送它,没有任何问题。
我尝试获取新的 repo,创建新文件,重新安装 git,git config --global http.postBuffer 524288000还有更大的数字,还有 https.postBuffer 等等。也安装桌面版同样的问题进来。
我遇到的问题主要是 React 应用程序。
有人知道解决方案吗?会出什么问题?
我在BitBucket上有一个超过4GB的GIT存储库.
我无法使用普通的GIT命令克隆存储库,因为它失败了(看起来它工作了很长时间但后来又回滚).
我也无法从BitBucket界面下载存储库作为zip:
Feature unavailable This repository is too large for us to generate a download.
Run Code Online (Sandbox Code Playgroud)
有没有办法逐步下载GIT存储库?
git ×9
bitbucket ×2
clone ×2
git-fetch ×2
github ×2
branch ×1
curl ×1
git-branch ×1
javascript ×1
jenkins ×1
reactjs ×1
repository ×1
ssh ×1
windows ×1