* Rerunning merge on a single file
@ 2008-10-14 12:13 Kristian Amlie
2008-10-14 12:21 ` Santi Béjar
0 siblings, 1 reply; 4+ messages in thread
From: Kristian Amlie @ 2008-10-14 12:13 UTC (permalink / raw)
To: git
Hey, I have question about advanced merging.
Suppose I have a huge merge with conflicts all over the place. There is
no way to avoid them, so I start working from the top. At some point,
however, I make a mistake and lose the merge information for one file
(for example by checking out the file from HEAD).
In that case I would like to get the conflict markers back, and do that
file over again, but I don't want to throw away the rest of the index
state. Currently the only way I can see to do this is by checking out
several file versions under different names and then using git
merge-file on them.
Is there a better way to achieve this?
Kristian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rerunning merge on a single file
2008-10-14 12:13 Rerunning merge on a single file Kristian Amlie
@ 2008-10-14 12:21 ` Santi Béjar
2008-10-14 12:28 ` Santi Béjar
2008-10-14 12:48 ` Kristian Amlie
0 siblings, 2 replies; 4+ messages in thread
From: Santi Béjar @ 2008-10-14 12:21 UTC (permalink / raw)
To: Kristian Amlie; +Cc: git
On Tue, Oct 14, 2008 at 2:13 PM, Kristian Amlie
<kristian.amlie@trolltech.com> wrote:
> Hey, I have question about advanced merging.
>
> Suppose I have a huge merge with conflicts all over the place. There is no
> way to avoid them, so I start working from the top. At some point, however,
> I make a mistake and lose the merge information for one file (for example by
> checking out the file from HEAD).
>
> In that case I would like to get the conflict markers back, and do that file
> over again, but I don't want to throw away the rest of the index state.
> Currently the only way I can see to do this is by checking out several file
> versions under different names and then using git merge-file on them.
>
> Is there a better way to achieve this?
If the different versions are still in the index you could use:
$ git checkout --merge $file
Santi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rerunning merge on a single file
2008-10-14 12:21 ` Santi Béjar
@ 2008-10-14 12:28 ` Santi Béjar
2008-10-14 12:48 ` Kristian Amlie
1 sibling, 0 replies; 4+ messages in thread
From: Santi Béjar @ 2008-10-14 12:28 UTC (permalink / raw)
To: Kristian Amlie; +Cc: git
On Tue, Oct 14, 2008 at 2:21 PM, Santi Béjar <santi@agolina.net> wrote:
> On Tue, Oct 14, 2008 at 2:13 PM, Kristian Amlie
> <kristian.amlie@trolltech.com> wrote:
>> Hey, I have question about advanced merging.
>>
>> Suppose I have a huge merge with conflicts all over the place. There is no
>> way to avoid them, so I start working from the top. At some point, however,
>> I make a mistake and lose the merge information for one file (for example by
>> checking out the file from HEAD).
>>
>> In that case I would like to get the conflict markers back, and do that file
>> over again, but I don't want to throw away the rest of the index state.
>> Currently the only way I can see to do this is by checking out several file
>> versions under different names and then using git merge-file on them.
>>
>> Is there a better way to achieve this?
>
> If the different versions are still in the index you could use:
>
> $ git checkout --merge $file
Note that this is very new, as it was introduced in
v1.6.0.1-26-geac5a40, so you'll need at least 1.6.0.2.
Santi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rerunning merge on a single file
2008-10-14 12:21 ` Santi Béjar
2008-10-14 12:28 ` Santi Béjar
@ 2008-10-14 12:48 ` Kristian Amlie
1 sibling, 0 replies; 4+ messages in thread
From: Kristian Amlie @ 2008-10-14 12:48 UTC (permalink / raw)
To: Santi Béjar; +Cc: git
Santi Béjar wrote:
> On Tue, Oct 14, 2008 at 2:13 PM, Kristian Amlie
> <kristian.amlie@trolltech.com> wrote:
>> Hey, I have question about advanced merging.
>>
>> Suppose I have a huge merge with conflicts all over the place. There is no
>> way to avoid them, so I start working from the top. At some point, however,
>> I make a mistake and lose the merge information for one file (for example by
>> checking out the file from HEAD).
>>
>> In that case I would like to get the conflict markers back, and do that file
>> over again, but I don't want to throw away the rest of the index state.
>> Currently the only way I can see to do this is by checking out several file
>> versions under different names and then using git merge-file on them.
>>
>> Is there a better way to achieve this?
>
> If the different versions are still in the index you could use:
>
> $ git checkout --merge $file
In my case the files were added to the index already, so I guess it
doesn't work then?
Kristian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-14 12:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 12:13 Rerunning merge on a single file Kristian Amlie
2008-10-14 12:21 ` Santi Béjar
2008-10-14 12:28 ` Santi Béjar
2008-10-14 12:48 ` Kristian Amlie
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).