- 编辑 - 我最终将所有文件复制到另一个文件夹中.没有提交历史.:(
谢谢你的回应.
- /编辑 -
我是git的新手.对于我的html5应用程序,我使用了aptana的html5样板文件,为你安装了一个git存储库.尼斯.现在,在我的应用程序工作几周后,我想把它推到github.我在那里创建了一个新的存储库
现在,当我尝试从shell或tortoisegit推送到github时,我在上传所有文件后遇到错误:
$ git push -u origin master
...
remote: error: unable to find b4587434...<snip>...c701 (probably a checksum)
remote: fatal: objet of unexpected type
error: unpack failed: index-pack abnormal exit
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'https://github.com/<user>/<project>.git'
Run Code Online (Sandbox Code Playgroud)
我一直在寻找一个解决方案,但还没有找到一些东西.我试过的一些行动没有帮助:
请帮助,git花费这么多时间来找出应该简单的东西真的很令人沮丧.:(
我试图镜像 Twbs bootstrap,但遇到了这样的错误,我的问题是我使用--depth=1. 我在没有参数的情况下重新克隆了存储库--depth=,并且使用以下步骤一切正常:
git clone --bare https://github.com/twbs/bootstrap.gitcd bootstrap.gitgit push --mirror git@github.com:yourusername/your-repo-name.gitcd ../ && rm -rf bootstrap.gitgit clone git@github.com:yourusername/your-repo-name.gitcd your-repo-namegit remote add twbs https://github.com/twbs/bootstrap.git现在,您可以推送到您自己的存储库版本git push origin master,如果您想从原始存储库中提取更改,您可以简单地执行以下操作git pull twbs master。
更多信息可用@ https://help.github.com/articles/duplicating-a-repository/
小智 0
所以你可以尝试的一件事是:
删除所有旧的原始遥控器
git remote
git remote rm origin
Run Code Online (Sandbox Code Playgroud)创建一个名为“origin”的 github 远程(或任何你想要的名称)
git remote add origin git@github.com:USER_NAME/REPO_NAME.git
Run Code Online (Sandbox Code Playgroud)将文件推送到刚刚添加的远程服务器
git push remote origin master
Run Code Online (Sandbox Code Playgroud)这些步骤假设您已完成:
git init # creates a local repo
git add . # adds all files in the current directory
git commit -m "init commit" #commits your init
Run Code Online (Sandbox Code Playgroud)
我知道这些是非常基本的步骤,可能无法回答您收到的错误,但这些步骤
另一件要尝试的事情是检查仓库中是否有仓库。这是我的学生有时会遇到的事情。绑定推送和权限时会导致一些错误
| 归档时间: |
|
| 查看次数: |
3280 次 |
| 最近记录: |