git 创建分支后哈希竟然和父分支一样
迷茫
迷茫 2017-05-02 09:18:27
0
1
533

我从 master 分出来 develop 分支做开发,今天要测试一个功能 又从 develop 出了个分支 test,没想到两个分支的 哈希 竟然一模一样

test
提交: e033e8a69384bf228d3d78ba486b4841ce2d3320 [e033e8a]
父级: ce67fb224a

develop
提交: e033e8a69384bf228d3d78ba486b4841ce2d3320 [e033e8a]
父级: ce67fb224a

而且即便我删除了再重新创建分支也会是一样的 哈希,这是什么情况啊?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
过去多啦不再A梦

Git is not svn, creating a branch will not completely copy a snapshot. Git just creates a pointer test, pointing to the same location as develop.

The hash value in git is the hash value of each commit, and branches have no hash value. Because there are no new commits after the test is created, they still refer to the same commit, so naturally they have the same hash value.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!