git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: I used git pull instead of stg pull !

From
Jean-Christian de Rivaz <jc@eclis.ch>
Date
Jul 10, 2007, 14:20 UTC
Message-ID
<46939598.9000103@eclis.ch>
In-Reply-To
<20070710132957.GA9297@diana.vm.bytemark.co.uk>
Thanks a lot Karl,
Your method solved the problem perfectly.

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

Karl Hasselström a écrit :
Show 32 quoted lines
> 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.
> 
Previous: Karl Hasselström
Message 3 of 3 in “I used git pull instead of stg pull !”
  1. Jean-Christian de RivazJul 10, 2007
  2. Karl HasselströmJul 10, 2007
  3. Jean-Christian de RivazJul 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.