{"thread":{"id":"8958","subject":"I used git pull instead of stg pull !","startedAt":"2007-07-10T09:52:47Z","lastAt":"2007-07-10T14:20:08Z","messageCount":3,"participants":["Jean-Christian de Rivaz","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"46930","messageId":"469356EF.201@eclis.ch","threadId":"8958","inReplyTo":null,"subject":"I used git pull instead of stg pull !","fromName":"Jean-Christian de Rivaz","fromEmail":"jc@eclis.ch","sentAt":"2007-07-10T09:52:47Z","receivedAt":"2007-07-10T09:52:47Z","isPatch":false,"sender":{"key":"jc@eclis.ch","avatar":"https://gravatar.com/avatar/c5bc03f5e932f737c47e353ef0dac2892161d59831c170cab6d61342e6324eb3?d=mp&s=160"},"body":"Hi,\n\nI have made the error to use the \"git pull\" command instead of the \"stg \npull\" command. The \"git pull\" have been executed successfuly, but now \nstg seem to be confused:\n\nstg pull -n\nstg pull: local changes in the tree. Use \"refresh\" to commit them\n\nstg new dummy -m \"dummy\"\nstg new: HEAD and top are not the same. You probably committed\n   changes to the tree outside of StGIT. If you know what you\n   are doing, use the \"refresh -f\" command\n\nHow can I restore the archive to a normal state for stg ?\n\nBest regards,\n--\nJean-Christian de Rivaz\n"},{"id":"46938","messageId":"20070710132957.GA9297@diana.vm.bytemark.co.uk","threadId":"8958","inReplyTo":"469356EF.201@eclis.ch","subject":"Re: I used git pull instead of stg pull !","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-07-10T13:29:57Z","receivedAt":"2007-07-10T13:29:57Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-07-10 11:52:47 +0200, Jean-Christian de Rivaz wrote:\n\n> I have made the error to use the \"git pull\" command instead of the\n> \"stg pull\" command. The \"git pull\" have been executed successfuly,\n> but now stg seem to be confused:\n>\n> stg pull -n\n> stg pull: local changes in the tree. Use \"refresh\" to commit them\n>\n> stg new dummy -m \"dummy\"\n> stg new: HEAD and top are not the same. You probably committed\n>   changes to the tree outside of StGIT. If you know what you\n>   are doing, use the \"refresh -f\" command\n>\n> How can I restore the archive to a normal state for stg ?\n\nThe problem is that you have committed a merge on top of the StGIT\nstack, and StGIT can't deal with that. You can undo the merge\n(provided that you haven't committed anything else on top of it) with\n\"git reset --hard HEAD^\".\n\n  NOTE: \"reset --hard\" will erase uncommitted modifications to working\n  tree files, so first make sure that \"git status\" doesn't report any\n  modifications you want to keep.\n\nIf you want to get a better view of what it is you're doing, you could\nfire up gitk and find the sha1 of the commit that is supposed to be at\nthe top of the StGIT stack, and \"git reset <sha1>\" to that commit.\n\nOnce the merge is undone, just \"stg pull\" like you wanted to do in the\nfirst place.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"46951","messageId":"46939598.9000103@eclis.ch","threadId":"8958","inReplyTo":"20070710132957.GA9297@diana.vm.bytemark.co.uk","subject":"Re: I used git pull instead of stg pull !","fromName":"Jean-Christian de Rivaz","fromEmail":"jc@eclis.ch","sentAt":"2007-07-10T14:20:08Z","receivedAt":"2007-07-10T14:20:08Z","isPatch":false,"sender":{"key":"jc@eclis.ch","avatar":"https://gravatar.com/avatar/c5bc03f5e932f737c47e353ef0dac2892161d59831c170cab6d61342e6324eb3?d=mp&s=160"},"body":"Thanks a lot Karl,\n\nYour method solved the problem perfectly.\n\nHave a good day,\n--\nJean-Christian de Rivaz\n\nKarl Hasselström a écrit :\n> On 2007-07-10 11:52:47 +0200, Jean-Christian de Rivaz wrote:\n> \n>> I have made the error to use the \"git pull\" command instead of the\n>> \"stg pull\" command. The \"git pull\" have been executed successfuly,\n>> but now stg seem to be confused:\n>>\n>> stg pull -n\n>> stg pull: local changes in the tree. Use \"refresh\" to commit them\n>>\n>> stg new dummy -m \"dummy\"\n>> stg new: HEAD and top are not the same. You probably committed\n>>   changes to the tree outside of StGIT. If you know what you\n>>   are doing, use the \"refresh -f\" command\n>>\n>> How can I restore the archive to a normal state for stg ?\n> \n> The problem is that you have committed a merge on top of the StGIT\n> stack, and StGIT can't deal with that. You can undo the merge\n> (provided that you haven't committed anything else on top of it) with\n> \"git reset --hard HEAD^\".\n> \n>   NOTE: \"reset --hard\" will erase uncommitted modifications to working\n>   tree files, so first make sure that \"git status\" doesn't report any\n>   modifications you want to keep.\n> \n> If you want to get a better view of what it is you're doing, you could\n> fire up gitk and find the sha1 of the commit that is supposed to be at\n> the top of the StGIT stack, and \"git reset <sha1>\" to that commit.\n> \n> Once the merge is undone, just \"stg pull\" like you wanted to do in the\n> first place.\n> \n"}]}