Re: [PATCH 2/2] Re: rebase -i: explain how to discard all commits
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 21, 2011, 07:04 UTC
- Message-ID
- <alpine.DEB.1.00.1101210801210.15247@pacific.mpi-cbg.de>
- In-Reply-To
- <7vfwsnqn8c.fsf@alter.siamese.dyndns.org>
Hi,
On Thu, 20 Jan 2011, Junio C Hamano wrote:
Show 8 quoted lines
> Thomas Rast <trast@student.ethz.ch> writes: > > > (I for one have never accepted such a rebase; if the TODO only > > consists of noop, that means I made a mistake.) > > Wouldn't that suggest us that if we were to do anything to this message > it would be a good idea to teach the user to "reset --hard" the branch > if no commits truly needs to be replayed on top of the onto-commit?
The important difference between rebase -i && noop on the one, and reset --hard on the other hand is that the latter is completely unsafe. I mean, utterly completely super-unsafe. And I say that because _this here developer_ who is not exactly a Git noob lost stuff that way.
rebase -i checks that all is well and we could come back to the current status later if we realized that things went horribly wrong.
reset --hard does not do that. No safety net. No reflog. Nada.
Hth, Dscho