Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't resolve conflict if remote file was deleted #124

Open
deathaxe opened this issue Oct 14, 2018 · 3 comments
Open

Can't resolve conflict if remote file was deleted #124

deathaxe opened this issue Oct 14, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@deathaxe
Copy link

deathaxe commented Oct 14, 2018

Version info

  • OS: Windows 10
  • Build: 1072

Description

I have a repository which I am working on at 2 PCs. As a result the local master branches move on separately sometimes. I pushed changes from PC1 to a global remote which contains a deleted file I_FORCE.SPF. The master on PC2 contains the same file but with changes made locally. After pull --rebase at PC2 it displays the I_FORCE.SPF as conflicting. So far so good.

The issue now is: I can't resolve the conflict by deleting the local file.

Steps to reproduce

Right after rebasing the error the git command panel shows the conflict:

image

The conflicting file is displayed as "new file":

image

I can't resolve by deleting but only by opening the 3-way diff

image

Selecting the left "empty" content and hit save button

image

The result is an empty new file in the working tree, ready to be staged

image

No way to resolve by deleting my local changes.

Expected behavior

If a file does not exist in the remote repo, or resolving a conflict via 3-way-diff results in an empty file, this file should be deleted.

GitExtensions asks me to "keep my local changes" or "resolve by deleting my local changes" in such situations.

image

@wbond wbond added the bug Something isn't working label Oct 16, 2018
@adam-kemeny
Copy link

+1
Same issue here. Resolving the conflict of a deleted file, leads to a non-deleted empty file.
Also probably a separate issue but related, selecting Resolve Ours or Resolve Theirs leads to the same outcome (the file is not deleted and the changes from the other commit are used).

@personalnadir
Copy link

I have had the reverse, where the local file has been deleted. On the three way diff selecting the empty pane and clicking Save and Stage triggers a popup displaying the message: "Unable to save ~/path/to/directory: No such file or directory". However all other operations on the repository still work.

@sowizz
Copy link

sowizz commented Apr 23, 2024

@dpjohnst any updates? The issue is still present and quite annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants