{"thread":{"id":"15892","subject":"Rerunning merge on a single file","startedAt":"2008-10-14T12:13:15Z","lastAt":"2008-10-14T12:48:01Z","messageCount":4,"participants":["Kristian Amlie","Santi Béjar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"93002","messageId":"48F48CDB.1010309@trolltech.com","threadId":"15892","inReplyTo":null,"subject":"Rerunning merge on a single file","fromName":"Kristian Amlie","fromEmail":"kristian.amlie@trolltech.com","sentAt":"2008-10-14T12:13:15Z","receivedAt":"2008-10-14T12:13:15Z","isPatch":false,"sender":{"key":"kristian.amlie@trolltech.com","avatar":null},"body":"Hey, I have question about advanced merging.\n\nSuppose I have a huge merge with conflicts all over the place. There is \nno way to avoid them, so I start working from the top. At some point, \nhowever, I make a mistake and lose the merge information for one file \n(for example by checking out the file from HEAD).\n\nIn that case I would like to get the conflict markers back, and do that \nfile over again, but I don't want to throw away the rest of the index \nstate. Currently the only way I can see to do this is by checking out \nseveral file versions under different names and then using git \nmerge-file on them.\n\nIs there a better way to achieve this?\n\nKristian\n"},{"id":"93003","messageId":"adf1fd3d0810140521g7f43ee3bs5d4e60772bcc1d8c@mail.gmail.com","threadId":"15892","inReplyTo":"48F48CDB.1010309@trolltech.com","subject":"Re: Rerunning merge on a single file","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2008-10-14T12:21:48Z","receivedAt":"2008-10-14T12:21:48Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Tue, Oct 14, 2008 at 2:13 PM, Kristian Amlie\n<kristian.amlie@trolltech.com> wrote:\n> Hey, I have question about advanced merging.\n>\n> Suppose I have a huge merge with conflicts all over the place. There is no\n> way to avoid them, so I start working from the top. At some point, however,\n> I make a mistake and lose the merge information for one file (for example by\n> checking out the file from HEAD).\n>\n> In that case I would like to get the conflict markers back, and do that file\n> over again, but I don't want to throw away the rest of the index state.\n> Currently the only way I can see to do this is by checking out several file\n> versions under different names and then using git merge-file on them.\n>\n> Is there a better way to achieve this?\n\nIf the different versions are still in the index you could use:\n\n$ git checkout --merge $file\n\nSanti\n"},{"id":"93004","messageId":"adf1fd3d0810140528p8bf8958t528b226d01a55a45@mail.gmail.com","threadId":"15892","inReplyTo":"adf1fd3d0810140521g7f43ee3bs5d4e60772bcc1d8c@mail.gmail.com","subject":"Re: Rerunning merge on a single file","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2008-10-14T12:28:54Z","receivedAt":"2008-10-14T12:28:54Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Tue, Oct 14, 2008 at 2:21 PM, Santi Béjar <santi@agolina.net> wrote:\n> On Tue, Oct 14, 2008 at 2:13 PM, Kristian Amlie\n> <kristian.amlie@trolltech.com> wrote:\n>> Hey, I have question about advanced merging.\n>>\n>> Suppose I have a huge merge with conflicts all over the place. There is no\n>> way to avoid them, so I start working from the top. At some point, however,\n>> I make a mistake and lose the merge information for one file (for example by\n>> checking out the file from HEAD).\n>>\n>> In that case I would like to get the conflict markers back, and do that file\n>> over again, but I don't want to throw away the rest of the index state.\n>> Currently the only way I can see to do this is by checking out several file\n>> versions under different names and then using git merge-file on them.\n>>\n>> Is there a better way to achieve this?\n>\n> If the different versions are still in the index you could use:\n>\n> $ git checkout --merge $file\n\nNote that this is very new, as it was introduced in\nv1.6.0.1-26-geac5a40, so you'll need at least 1.6.0.2.\n\nSanti\n"},{"id":"93005","messageId":"48F49501.3010005@trolltech.com","threadId":"15892","inReplyTo":"adf1fd3d0810140521g7f43ee3bs5d4e60772bcc1d8c@mail.gmail.com","subject":"Re: Rerunning merge on a single file","fromName":"Kristian Amlie","fromEmail":"kristian.amlie@trolltech.com","sentAt":"2008-10-14T12:48:01Z","receivedAt":"2008-10-14T12:48:01Z","isPatch":false,"sender":{"key":"kristian.amlie@trolltech.com","avatar":null},"body":"Santi Béjar wrote:\n> On Tue, Oct 14, 2008 at 2:13 PM, Kristian Amlie\n> <kristian.amlie@trolltech.com> wrote:\n>> Hey, I have question about advanced merging.\n>>\n>> Suppose I have a huge merge with conflicts all over the place. There is no\n>> way to avoid them, so I start working from the top. At some point, however,\n>> I make a mistake and lose the merge information for one file (for example by\n>> checking out the file from HEAD).\n>>\n>> In that case I would like to get the conflict markers back, and do that file\n>> over again, but I don't want to throw away the rest of the index state.\n>> Currently the only way I can see to do this is by checking out several file\n>> versions under different names and then using git merge-file on them.\n>>\n>> Is there a better way to achieve this?\n> \n> If the different versions are still in the index you could use:\n> \n> $ git checkout --merge $file\n\nIn my case the files were added to the index already, so I guess it \ndoesn't work then?\n\nKristian\n"}]}