Skip to content

Im unable to fix a merge conflict gone wrong #248007

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

Open
torbjorn opened this issue May 2, 2025 · 2 comments
Open

Im unable to fix a merge conflict gone wrong #248007

torbjorn opened this issue May 2, 2025 · 2 comments
Assignees
Labels
git GIT issues info-needed Issue requires more information from poster

Comments

@torbjorn
Copy link

torbjorn commented May 2, 2025

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.99.3-1744761595
  • OS Version: Ubuntu 24.04.2 LTS

Steps to Reproduce:

  1. mess up a git merge conflict
  2. observe that you're unable to fix the file with the merge helper enabled

Issue

I ended up with this file after a git rebase and conflict resolution went horrendously wrong:

image: hashicorp/terraform:latest

pipelines:
  default:
    - step:
        name: Terraform Plan
<<<<<<< HEAD
<<<<<<< HEAD
        runs-on:
          - linux
          - self.hosted
=======
>>>>>>> 24edb44 (the pipeline)
=======
        runs-on:
          - linux
          - self.hosted
>>>>>>> 4e76fc3 (removed gitlab)
        script:
          - terraform init
          - terraform validate
          - terraform fmt -check
          - terraform plan
  branches:
    main:
      - step:
          name: Terraform Apply
<<<<<<< HEAD
<<<<<<< HEAD
          runs-on:
            - linux
            - self.hosted
=======
>>>>>>> 24edb44 (the pipeline)
=======
          runs-on:
            - linux
            - self.hosted
>>>>>>> 4e76fc3 (removed gitlab)
          script:
            - terraform init
            - terraform validate
            - terraform apply -auto-approve

When editinf this file in vscode, it looks like this:

Image

I can click those small red arrow/triangles on the side, but the view offered doesnt let me actually edit the file. I just want to remove and/or clean up manually with no intervention from vscode to help me with the conflict annotation. Is that possible, short of disabling the entire thing in settings? (At that point I'd just do it in another editor, (vim/emacs/nano etc)

@lszomoru
Copy link
Member

lszomoru commented May 5, 2025

When clicking on the deleted line editor decoration, do you see the "Revert" action in the title of the peek view? Clicking that should allow you to bring back the deleted code. Another option would be to open the merge conflict in the merge editor which should allow you do manually editor the result file.

@lszomoru lszomoru added git GIT issues info-needed Issue requires more information from poster labels May 5, 2025
@torbjorn
Copy link
Author

torbjorn commented May 7, 2025

When this happened, I had already (in error) resolved the conflict (using git add). There was a more complex back-story to this, but that was the situation at the time. Not sure how that plays into what capabilities vscode choosed to present to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git GIT issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants