* How to resolve mixture of modified and deleted conflicts easily in git?
@ 2017-10-31 16:31 Robert Dailey
2017-11-04 19:10 ` Philip Oakley
0 siblings, 1 reply; 2+ messages in thread
From: Robert Dailey @ 2017-10-31 16:31 UTC (permalink / raw)
To: Git
When doing a rebase, sometimes I will get `DU` and `UU` conflicts
(locally deleted and locally modified, respectively). Furthermore, in
some of these cases, I want to take "ours" for all conflicts,
including ones where the local file is deleted. Ideally, it's just one
command:
$ git checkout --ours .
However, this fails for the locally deleted conflicts:
error: path 'foo.xml' does not have our version
Even more annoyingly, the fact that these failures occur prevents the
`UU` conflicts from being resolved. The whole operation fails
atomically. I am not aware of a straightforward and uniform way to
resolve conflicts with "ours" during a rebase when locally deleted
files exist in the list of conflicts. What is the most elegant
solution in this situation?
I'm running Git for Windows v2.13.1.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to resolve mixture of modified and deleted conflicts easily in git?
2017-10-31 16:31 How to resolve mixture of modified and deleted conflicts easily in git? Robert Dailey
@ 2017-11-04 19:10 ` Philip Oakley
0 siblings, 0 replies; 2+ messages in thread
From: Philip Oakley @ 2017-11-04 19:10 UTC (permalink / raw)
To: Robert Dailey, Git
From: "Robert Dailey" <rcdailey.lists@gmail.com>
> When doing a rebase, sometimes I will get `DU` and `UU` conflicts
> (locally deleted and locally modified, respectively). Furthermore, in
> some of these cases, I want to take "ours" for all conflicts,
> including ones where the local file is deleted. Ideally, it's just one
> command:
>
> $ git checkout --ours .
>
> However, this fails for the locally deleted conflicts:
>
> error: path 'foo.xml' does not have our version
>
> Even more annoyingly, the fact that these failures occur prevents the
> `UU` conflicts from being resolved. The whole operation fails
> atomically. I am not aware of a straightforward and uniform way to
> resolve conflicts with "ours" during a rebase when locally deleted
> files exist in the list of conflicts. What is the most elegant
> solution in this situation?
>
> I'm running Git for Windows v2.13.1.
Can you give the example commands and response?
In particular note the comment in the rebase command that the ours/theirs
viewpoints are swapped, so you may find your stated "ours" should be (mid
rebase) seen as "theirs".
--
Philip
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-04 19:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-31 16:31 How to resolve mixture of modified and deleted conflicts easily in git? Robert Dailey
2017-11-04 19:10 ` Philip Oakley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox