Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Detached HEAD (experimental)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:48

Carl Worth [off-list ref] writes:
Frankly, I don't understand why so much effort is being put toward
allowing these "fragile commits" to be made in the first place. Why
not require users to name the branch before creating any commits, just
as has always been the case?
Then we would not be talking about detached HEAD at all.  Why
not require users to name the branch if they want to check out
what they should not be able to in the first place?

Convenience.

Some features of git are about being convenient by allowing you
to defer the decision.  You can start mucking with the working
tree files without knowing where it leads to and then from that
point with the dirty working tree state decide to fork what you
have started using "checkout -b newbranch".  Even though you may
have many dirty files in the working tree, you can selectively
update index (especially with the patch subcommand of the
interactive git-add) to prepare for commit -- you do not choose
what to edit, but you defer the decision of what to include in
the commit.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help