git SHA1 0000000000000000000000000000000000000000(全零),这是正常的吗? [英] git SHA1 0000000000000000000000000000000000000000 (all zeroes), is this normal?

查看:403
本文介绍了git SHA1 0000000000000000000000000000000000000000(全零),这是正常的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



请不要回答我的问题:我有一个与SHA1 0000000000000000000000000000000000000000(全零)的git尚未无限制的分支,这是正常的还是我腐败的git仓库?是的,有一个在2 ^ 160或者是0.0000000000000000000000000000000000000000000000424777657836021%的概率有那个SHA1。



我相当安全我不是幸运的人,他获得了000000000000000000000000000000000000的SHA1他的git仓库。

解决方案

提交包括其他元数据中的提交日期。所以提交哈希不能显示,直到提交实际上已经创建。你看到的不是提交SHA,它只是UI中使用的默认值。


I have a yet uncommited branch in git with SHA1 0000000000000000000000000000000000000000 (all zeroes), is this normal or did I corrupt the git repository?

Please don't answer yes there's one in 2^160, or 0.00000000000000000000000000000000000000000000006842277657836021% probabilities to have that SHA1.

I am reasonably safe I'm not the lucky guy who got the SHA1 of 0000000000000000000000000000000000000000 in his git repository.

解决方案

A commit includes, among other metadata, the commit date. So the commit hash can't be displayed until the commit has actually been created. What you're seeing is not a commit SHA, it's just a default value used in the UI.

这篇关于git SHA1 0000000000000000000000000000000000000000(全零),这是正常的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆