[请益] GIT Detached HEAD 疑问

楼主: Boston (Boston)   2016-04-07 16:02:16
有时候使用 git branch 会跑到暂存的 detached head内
每每我都是用 git checkout 切回来后继续使用
对 git 的 detached head 的用法不是很了解
请问 detached head 的用途为?
谢谢
作者: jackylu63 (J)   2016-04-07 16:14:00
没有什么特殊用途,对我来说detached HEAD只是一个过程HEAD是否为detached不重要,重要的是HEAD是一个referenc另外,HEAD是许多git指令默认的reference
作者: evanslify (evs)   2016-04-07 17:05:00
detached head 代表你目前的 head 不存在于你本地端已有的分支内
作者: aska2000   2016-04-07 18:31:00
The detached head used to be "no branch"
作者: sean2449 (肉松)   2016-04-07 18:43:00
你应该只是切到某个commit但没给branch名字
作者: descent (“雄辩是银,沉默是金”)   2016-04-08 23:37:00
detached head 的 commit 在某个时间后是会被删除的

Links booklink

Contact Us: admin [ a t ] ucptt.com