* [971f835] (HEAD, original_idea) Now working here. Some comment 9
* [692b673] Some comment 8
* [3ebff62] Reverted to original idea. Some comment 7
| * [72ea01d] (master) Decided it wasn't worth the effort. Some comment 6
| * [985c1ad] Some comment 5
| * [4d7d491] Some comment 4
| * [0c697bb] Branched to try an idea. Some comment 3
|/
* [7280b1f] Some comment 2
* [5c2c6d0] Some comment 1
* [bc7aac6] Initial commit
看起来master
被落下了。不确定是怎么发生的。一旦我决定放弃之前的分支,我就检出了[7280b1f]
,然后从那里继续。
我该怎么修复这个问题?这是臭名昭著的“游离 HEAD”问题吗?
为了保持仓库的最佳健康状态,master
是否必须与HEAD
对齐?
我的工作流非常简单,只是管理一个文本文件。在绝大多数情况下,它会是:
git add .
git commit -am "Some comment"
就是这样。
我决定尝试一个想法并创建了一个分支。当它没有成功时,我检出该分支的根目录并回到git add/commit
例程。