* rebase: Ask before doing anything not undoable
@ 2018-12-20 17:33 Ricardo Biehl Pasquali
2018-12-20 18:28 ` Thomas Braun
[not found] ` <20181220182653.GB4823@alpha>
0 siblings, 2 replies; 6+ messages in thread
From: Ricardo Biehl Pasquali @ 2018-12-20 17:33 UTC (permalink / raw)
To: git
It was the second time I've typed "git rebase --co",
hit tab (for completion) and enter, and the result was
--committer-date-is-author-date instead of --continue .
Please do ask user before run actions like these! I have
not found a way to undo that. I had to perform a reset in
the repository.
PS: Notice I was expecting a command of interactive rebase,
and I got a bunch of commits's date (and hash) changed.
Cheers!
pasquali
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rebase: Ask before doing anything not undoable
2018-12-20 17:33 rebase: Ask before doing anything not undoable Ricardo Biehl Pasquali
@ 2018-12-20 18:28 ` Thomas Braun
2018-12-20 18:56 ` Ricardo Biehl Pasquali
[not found] ` <20181220182653.GB4823@alpha>
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Braun @ 2018-12-20 18:28 UTC (permalink / raw)
To: Ricardo Biehl Pasquali, git
Am 20.12.2018 um 18:33 schrieb Ricardo Biehl Pasquali:
> It was the second time I've typed "git rebase --co",
> hit tab (for completion) and enter, and the result was
> --committer-date-is-author-date instead of --continue .
>
> Please do ask user before run actions like these! I have
> not found a way to undo that. I had to perform a reset in
> the repository.
>
> PS: Notice I was expecting a command of interactive rebase,
> and I got a bunch of commits's date (and hash) changed.
Do you know about the reflog? This let's you undo these kind of changes.
See git help reflog.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rebase: Ask before doing anything not undoable
2018-12-20 18:28 ` Thomas Braun
@ 2018-12-20 18:56 ` Ricardo Biehl Pasquali
0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Biehl Pasquali @ 2018-12-20 18:56 UTC (permalink / raw)
To: Thomas Braun; +Cc: git
On Thu, Dec 20, 2018 at 07:28:20PM +0100, Thomas Braun wrote:
> Do you know about the reflog? This let's you undo these kind of changes.
> See git help reflog.
I didn't. This should be documented in rebase manual page.
Perhaps a message after the command might be interesting
(e.g.: "to undo use git reflog").
Thank you!
pasquali
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rebase: Ask before doing anything not undoable
[not found] ` <20181220182653.GB4823@alpha>
@ 2018-12-20 21:11 ` Ricardo Biehl Pasquali
2018-12-20 21:37 ` Thomas Braun
0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Biehl Pasquali @ 2018-12-20 21:11 UTC (permalink / raw)
To: Kevin Daudt; +Cc: git
Ccing the mailing list.
On Thu, Dec 20, 2018 at 07:26:53PM +0100, Kevin Daudt wrote:
> It would be anoying for users to have to constantly confirm when they
> run git rebase --continue. Rather than asking confirmation, it would be
> better to make it easy to go back to the previous state.
I meant confirmation for --committer-date-is-author-date
option.
As Thomas said, it should be possible to undo the action
using reflog, although this seems not as easy as it should
be yet.
pasquali
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rebase: Ask before doing anything not undoable
2018-12-20 21:11 ` Ricardo Biehl Pasquali
@ 2018-12-20 21:37 ` Thomas Braun
2018-12-21 0:23 ` Ricardo Biehl Pasquali
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Braun @ 2018-12-20 21:37 UTC (permalink / raw)
To: Ricardo Biehl Pasquali, Kevin Daudt; +Cc: git
Am 20.12.2018 um 22:11 schrieb Ricardo Biehl Pasquali:
> Ccing the mailing list.
>
> On Thu, Dec 20, 2018 at 07:26:53PM +0100, Kevin Daudt wrote:
>> It would be anoying for users to have to constantly confirm when they
>> run git rebase --continue. Rather than asking confirmation, it would be
>> better to make it easy to go back to the previous state.
>
> I meant confirmation for --committer-date-is-author-date
> option.
>
> As Thomas said, it should be possible to undo the action
> using reflog, although this seems not as easy as it should
> be yet.
The git rebase documentation has
ORIG_HEAD is set to point at the tip of the branch before the reset.
so doing
git reset ORIG_HEAD
does reset to the state before the rebase.
For avoiding the original problem of --co completing to
--committer-date-is-author-date I'm using the alias rc for git rebase
--continue.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rebase: Ask before doing anything not undoable
2018-12-20 21:37 ` Thomas Braun
@ 2018-12-21 0:23 ` Ricardo Biehl Pasquali
0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Biehl Pasquali @ 2018-12-21 0:23 UTC (permalink / raw)
To: Thomas Braun; +Cc: Kevin Daudt, git
On Thu, Dec 20, 2018 at 10:37:00PM +0100, Thomas Braun wrote:
> The git rebase documentation has
>
> ORIG_HEAD is set to point at the tip of the branch before the reset.
>
> so doing
>
> git reset ORIG_HEAD
>
> does reset to the state before the rebase.
That's pretty easy :-)
> For avoiding the original problem of --co completing to
> --committer-date-is-author-date I'm using the alias rc for git rebase
> --continue.
It's definetly an alternative. Anyway, ORIG_HEAD reset is
sufficient for the cases when enter is hit before noticing
the completion string.
Thank you!
pasquali
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-12-21 0:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-20 17:33 rebase: Ask before doing anything not undoable Ricardo Biehl Pasquali
2018-12-20 18:28 ` Thomas Braun
2018-12-20 18:56 ` Ricardo Biehl Pasquali
[not found] ` <20181220182653.GB4823@alpha>
2018-12-20 21:11 ` Ricardo Biehl Pasquali
2018-12-20 21:37 ` Thomas Braun
2018-12-21 0:23 ` Ricardo Biehl Pasquali
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).