无法推送到Bitbucket存储库 [英] Failed to push to Bitbucket repository
问题描述
我有一个Bitbucket存储库,我是远程存储库中唯一的一个存储库.一切正常,突然我不能再推了. git push origin master
返回
I have a Bitbucket repository.I am the only one working on my remote repository. Everything works fine and suddently I cannot push anymore.
git push origin master
returns
Enumerating objects: 145, done.
Counting objects: 100% (145/145), done.
Delta compression using up to 4 threads
Compressing objects: 100% (84/84), done.
fatal: unable to read 663ac546bf5ff0f76a5f41881b73b5c03c3d9bae
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly error:
failed to push some refs to ...
git pull
说已更新.有什么想法/理由为什么我是唯一在我的存储库上工作的人突然得到此错误?
git pull
says Already up to date. Any idea/reason why getting this error suddently while I am the only one working on my repository?
不确定该问题是否与之前发生的事情有关.以前发生的是,当我在索引中添加了一些文件 git add
并且尚未提交时,我的计算机关闭了.
Not sure if the issue is related to what happen before. What happens before is that my computer shutdown when I added some files git add
in the index and I had not yet commited.
启动计算机后,运行 git ls-files -m
时出现以下问题:
After getting my computer up, I had the following issue when runing git ls-files -m
:
error: bad signature 0x00000000
fatal: index file corrupt
Seems my filesystem was corrupted and I fix the file system issue following this (rm .git/index
then git reset
). I was able to run git commands and add my files to the index. After commit, I started having this issue.
谢谢
推荐答案
全部
最后,我唯一能做的就是重置本地存储库并手动备份/复制本地更改.然后,从远程克隆新的存储库,然后将我备份的更改手动添加到新的克隆的存储库中.
Finally the only way I was able to do was to reset the local repository and manually backup/copy my local changes. Then, clone a new repository from remote and manually add my backed up changes to the new cloned repository.
谢谢
这篇关于无法推送到Bitbucket存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!