git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* I used git pull instead of stg pull !
@ 2007-07-10  9:52 Jean-Christian de Rivaz
  2007-07-10 13:29 ` Karl Hasselström
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Christian de Rivaz @ 2007-07-10  9:52 UTC (permalink / raw)
  To: git

Hi,

I have made the error to use the "git pull" command instead of the "stg 
pull" command. The "git pull" have been executed successfuly, but now 
stg seem to be confused:

stg pull -n
stg pull: local changes in the tree. Use "refresh" to commit them

stg new dummy -m "dummy"
stg new: HEAD and top are not the same. You probably committed
   changes to the tree outside of StGIT. If you know what you
   are doing, use the "refresh -f" command

How can I restore the archive to a normal state for stg ?

Best regards,
--
Jean-Christian de Rivaz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I used git pull instead of stg pull !
  2007-07-10  9:52 I used git pull instead of stg pull ! Jean-Christian de Rivaz
@ 2007-07-10 13:29 ` Karl Hasselström
  2007-07-10 14:20   ` Jean-Christian de Rivaz
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Hasselström @ 2007-07-10 13:29 UTC (permalink / raw)
  To: Jean-Christian de Rivaz; +Cc: git

On 2007-07-10 11:52:47 +0200, Jean-Christian de Rivaz wrote:

> I have made the error to use the "git pull" command instead of the
> "stg pull" command. The "git pull" have been executed successfuly,
> but now stg seem to be confused:
>
> stg pull -n
> stg pull: local changes in the tree. Use "refresh" to commit them
>
> stg new dummy -m "dummy"
> stg new: HEAD and top are not the same. You probably committed
>   changes to the tree outside of StGIT. If you know what you
>   are doing, use the "refresh -f" command
>
> How can I restore the archive to a normal state for stg ?

The problem is that you have committed a merge on top of the StGIT
stack, and StGIT can't deal with that. You can undo the merge
(provided that you haven't committed anything else on top of it) with
"git reset --hard HEAD^".

  NOTE: "reset --hard" will erase uncommitted modifications to working
  tree files, so first make sure that "git status" doesn't report any
  modifications you want to keep.

If you want to get a better view of what it is you're doing, you could
fire up gitk and find the sha1 of the commit that is supposed to be at
the top of the StGIT stack, and "git reset <sha1>" to that commit.

Once the merge is undone, just "stg pull" like you wanted to do in the
first place.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I used git pull instead of stg pull !
  2007-07-10 13:29 ` Karl Hasselström
@ 2007-07-10 14:20   ` Jean-Christian de Rivaz
  0 siblings, 0 replies; 3+ messages in thread
From: Jean-Christian de Rivaz @ 2007-07-10 14:20 UTC (permalink / raw)
  To: Karl Hasselström; +Cc: git

Thanks a lot Karl,

Your method solved the problem perfectly.

Have a good day,
--
Jean-Christian de Rivaz

Karl Hasselström a écrit :
> On 2007-07-10 11:52:47 +0200, Jean-Christian de Rivaz wrote:
> 
>> I have made the error to use the "git pull" command instead of the
>> "stg pull" command. The "git pull" have been executed successfuly,
>> but now stg seem to be confused:
>>
>> stg pull -n
>> stg pull: local changes in the tree. Use "refresh" to commit them
>>
>> stg new dummy -m "dummy"
>> stg new: HEAD and top are not the same. You probably committed
>>   changes to the tree outside of StGIT. If you know what you
>>   are doing, use the "refresh -f" command
>>
>> How can I restore the archive to a normal state for stg ?
> 
> The problem is that you have committed a merge on top of the StGIT
> stack, and StGIT can't deal with that. You can undo the merge
> (provided that you haven't committed anything else on top of it) with
> "git reset --hard HEAD^".
> 
>   NOTE: "reset --hard" will erase uncommitted modifications to working
>   tree files, so first make sure that "git status" doesn't report any
>   modifications you want to keep.
> 
> If you want to get a better view of what it is you're doing, you could
> fire up gitk and find the sha1 of the commit that is supposed to be at
> the top of the StGIT stack, and "git reset <sha1>" to that commit.
> 
> Once the merge is undone, just "stg pull" like you wanted to do in the
> first place.
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-10 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-10  9:52 I used git pull instead of stg pull ! Jean-Christian de Rivaz
2007-07-10 13:29 ` Karl Hasselström
2007-07-10 14:20   ` Jean-Christian de Rivaz

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).