Re: About detached heads
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Mar 14, 2008, 18:51 UTC
- Message-ID
- <alpine.LFD.1.00.0803141150070.3557@woody.linux-foundation.org>
- In-Reply-To
- <20080314183731.GA2994@atjola.homenet>
On Fri, 14 Mar 2008, Bj?rn Steinbrink wrote:
Show 12 quoted lines
> > Hm, that's just squashing revert commit. Squashing can be done via: > git reset --soft HEAD~5 # Or wherever your squashed commit should start > git commit -m "Squashed from HEAD~5 onwards" > > Now the "revert" version of that: > git reset --hard HEAD~5 # Go back to the state that we want > git reset --soft ORIG_HEAD # Move HEAD back, but keep the index as is > git commit -m "Back at the state of HEAD~5" > > AFAICT that should have the same advantages as using read-tree, but > doesn't feel so low-level :-)
Umm. The low-level one is a *lot* easier to understand than your "high-level" one, wouldn't you say?
And when the low-level plumbing commands are easier, are they not then better porcelain?
Linus