* Recover from a bad push in StGit
@ 2006-08-18 22:30 Robin Rosenberg
2006-08-19 0:11 ` Robin Rosenberg
2006-08-21 9:35 ` Catalin Marinas
0 siblings, 2 replies; 5+ messages in thread
From: Robin Rosenberg @ 2006-08-18 22:30 UTC (permalink / raw)
To: git
Hi,
I recently did some reordering of patches and goofed up (not totally, but
anyway). I pushed a number of patches and forgot one in the middle resulting
in a merge conflict. Pop won't work since I have local changes from the
conflict and I don't want to resolve the conflict either since I didn't mean
to push the patch at that point.
Is there a simple way of undoing a bad push?
In this case I had a fresh export do help me out so I could just delete the
patches and re-import them again, but what if I didn't?
-- robin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Recover from a bad push in StGit
2006-08-18 22:30 Recover from a bad push in StGit Robin Rosenberg
@ 2006-08-19 0:11 ` Robin Rosenberg
2006-08-21 9:35 ` Catalin Marinas
1 sibling, 0 replies; 5+ messages in thread
From: Robin Rosenberg @ 2006-08-19 0:11 UTC (permalink / raw)
To: git
lördag 19 augusti 2006 00:30 skrev Robin Rosenberg:
> Hi,
>
> I recently did some reordering of patches and goofed up (not totally, but
> anyway). I pushed a number of patches and forgot one in the middle
> resulting in a merge conflict. Pop won't work since I have local changes
> from the conflict and I don't want to resolve the conflict either since I
> didn't mean to push the patch at that point.
>
> Is there a simple way of undoing a bad push?
It was so simple
stg status --reset;stg pop
does the job. Sorry about the noise.
>
> In this case I had a fresh export do help me out so I could just delete the
> patches and re-import them again, but what if I didn't?
>
-- robin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Recover from a bad push in StGit
2006-08-18 22:30 Recover from a bad push in StGit Robin Rosenberg
2006-08-19 0:11 ` Robin Rosenberg
@ 2006-08-21 9:35 ` Catalin Marinas
2006-08-21 15:03 ` Robin Rosenberg
1 sibling, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2006-08-21 9:35 UTC (permalink / raw)
To: Robin Rosenberg; +Cc: git
Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> I recently did some reordering of patches and goofed up (not totally, but
> anyway). I pushed a number of patches and forgot one in the middle resulting
> in a merge conflict. Pop won't work since I have local changes from the
> conflict and I don't want to resolve the conflict either since I didn't mean
> to push the patch at that point.
>
> Is there a simple way of undoing a bad push?
>
> In this case I had a fresh export do help me out so I could just delete the
> patches and re-import them again, but what if I didn't?
"stg push --undo" (the same option for "refresh"; maybe I should add a
separate "undo" command) resets the local changes and it restores the
original boundaries of the patch (no information is lost). You could
use the latest snapshot as it has some bug-fixes from release 0.10.
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Recover from a bad push in StGit
2006-08-21 9:35 ` Catalin Marinas
@ 2006-08-21 15:03 ` Robin Rosenberg
2006-08-21 15:55 ` Catalin Marinas
0 siblings, 1 reply; 5+ messages in thread
From: Robin Rosenberg @ 2006-08-21 15:03 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
måndag 21 augusti 2006 11:35 skrev Catalin Marinas:
> Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> > I recently did some reordering of patches and goofed up (not totally, but
> > anyway). I pushed a number of patches and forgot one in the middle
> > resulting in a merge conflict. Pop won't work since I have local changes
> > from the conflict and I don't want to resolve the conflict either since I
> > didn't mean to push the patch at that point.
> >
> > Is there a simple way of undoing a bad push?
> >
> > In this case I had a fresh export do help me out so I could just delete
> > the patches and re-import them again, but what if I didn't?
>
> "stg push --undo" (the same option for "refresh"; maybe I should add a
> separate "undo" command) resets the local changes and it restores the
Not necessarily, but a hint about --undo when push/pop fail would have
helped me.
> original boundaries of the patch (no information is lost). You could
> use the latest snapshot as it has some bug-fixes from release 0.10.
Does refresh --undo make me see the state of the patch like it was before last
refresh, ie. stgit remembers the history of my patces? I thought it dropped
the references as obsolete.
-- robin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Recover from a bad push in StGit
2006-08-21 15:03 ` Robin Rosenberg
@ 2006-08-21 15:55 ` Catalin Marinas
0 siblings, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2006-08-21 15:55 UTC (permalink / raw)
To: Robin Rosenberg; +Cc: git
On 21/08/06, Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> måndag 21 augusti 2006 11:35 skrev Catalin Marinas:
> > "stg push --undo" (the same option for "refresh"; maybe I should add a
> > separate "undo" command) resets the local changes and it restores the
> Not necessarily, but a hint about --undo when push/pop fail would have
> helped me.
It is in the "stg help push" output but I could just display it when
the conflict happened.
> > original boundaries of the patch (no information is lost). You could
> > use the latest snapshot as it has some bug-fixes from release 0.10.
>
> Does refresh --undo make me see the state of the patch like it was before last
> refresh, ie. stgit remembers the history of my patces? I thought it dropped
> the references as obsolete.
The references before the last command are stored and they can be
obtained by "stg id <patch>//(bottom|top).old". As long as you haven't
run a git prune on your repository, you should be able to undo the
refresh.
I'm (slowly) working on patch history support using reflogs and (when
ready) you should be able to retrieve a previous state of the patch as
long as you haven't pruned your GIT repository.
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-08-21 15:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-18 22:30 Recover from a bad push in StGit Robin Rosenberg
2006-08-19 0:11 ` Robin Rosenberg
2006-08-21 9:35 ` Catalin Marinas
2006-08-21 15:03 ` Robin Rosenberg
2006-08-21 15:55 ` Catalin Marinas
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).