Re: [PATCH 2/2] Re: rebase -i: explain how to discard all commits

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 2/2] Re: rebase -i: explain how to discard all commits

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:26

Johannes Schindelin [off-list ref] writes:
quoted
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.
I think "rebase" already checks that the index and the working tree is
clean before starting, so referring to "reset --hard" when "rebase -i"
notices there is absolutely nothing to do is _not_ unsafe, no?

Re: [PATCH 2/2] Re: rebase -i: explain how to discard all commits

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:50:27

Hi,

On Fri, 21 Jan 2011, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
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.
I think "rebase" already checks that the index and the working tree is 
clean before starting, so referring to "reset --hard" when "rebase -i" 
notices there is absolutely nothing to do is _not_ unsafe, no?
Oh, so you want to suggest using "reset --hard" but warn at the same time 
that this command on its own is dangerous unless you run rebase first? :-)

Ciao,
Johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help