atjiu / pybbs

更实用的Java开发的社区(论坛),Better use of Java development community (forum)
GNU Affero General Public License v3.0
1.84k stars 706 forks source link

git clone failed #82

Closed lzysuqianqiu closed 5 years ago

lzysuqianqiu commented 5 years ago

error: unable to create file static/upload/avatar/icfhwffg /avatar.png: No such file or directory Checking out files: 100% (680/680), done. fatal: unable to checkout working tree 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'

atjiu commented 5 years ago

我克隆了一下,没有报错,你再试试

lzysuqianqiu commented 5 years ago

依然存在,我是windows环境,clone是成功了,但 but checkout failed 你可以删了static/upload/avatar 这个目录

zzzzbw commented 5 years ago

确实会fatal: unable to checkout working tree

E:\zbw\develop>git clone https://github.com/tomoya92/pybbs.git
Cloning into 'pybbs'...
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (51/51), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 21478 (delta 24), reused 43 (delta 22), pack-reused 21427
Receiving objects: 100% (21478/21478), 44.27 MiB | 172.00 KiB/s, done.
Resolving deltas: 100% (10023/10023), done.
error: unable to create file static/upload/avatar/icfhwffg /avatar.png: No such file or directory
Checking out files: 100% (648/648), done.
fatal: unable to checkout working tree
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'

因为icfhwffg这个文件夹后面有个空格,导致在windows下路径是非法的

zzzzbw commented 5 years ago

另外建议不要上传mysql文件夹吧,这个文件夹很大,网速不好的话也很容易git clone失败的。

atjiu commented 5 years ago

@lzysuqianqiu @zzzzbw 那文件夹是不小心传上去的, 这就删了

zzzzbw commented 5 years ago

@lzysuqianqiu @zzzzbw 那文件夹是不小心传上去的, 这就删了

其实。。。应当选择回退而不是删除的。。因为git是版本控制啊。。所以你删了再提交实际上那些文件还是‘存在’在项目中的

不过你这个可能来不及了吧,已经好几个版本了

atjiu commented 5 years ago

@zzzzbw 回退的话, 那跟着这些文件一块提交的文件不也回退了吗?

zzzzbw commented 5 years ago

@tomoya92 可以软回退到提交文件的那个版本,删掉文件后再重新commit,最后强制push到github上。

atjiu commented 5 years ago

@zzzzbw 好的, 记下了, 再错提文件了我试试, 谢谢