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

SCM: Git merge changes don't stage if I accept current version #60275

Closed
matteobosc opened this issue Oct 9, 2018 · 3 comments
Closed

SCM: Git merge changes don't stage if I accept current version #60275

matteobosc opened this issue Oct 9, 2018 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@matteobosc
Copy link

  • VSCode Version: 1.28.0
  • OS Version: Windows 10 Enterprise

Using Git as a source control provider I have an issue whenever I try to merge a conflict file with remote repository keeping my current version.

The steps are the following:

  1. A file has been modified on remote repository and I modify the same file on the local repository.

  2. When I try to push my changes to the server I recieve (correctly) an error message (no-fast-forward)
    and I must perform a pull to update my local repository.

  3. When pulling, the editor warn me about the conflict on the file, giving me four option (Accept Current
    Change, Accept Incoming Change, Accept Both Changes, Compare Changes).

  4. I accept the current change (my local version) and save the file. When I try to stage the change the file
    is not added to the section STAGED CHANGES but it disappears. Git remain in a "merging" status and I
    can't do anything (a push gives me the same error of the first push and a pull gives me an error like I
    didn't resolved the conflict; in fact in the .git folder I still have the MERGE_HEAD file)

If I Accept the Incoming Change, Accept Both Changes or add additional chars to my previous version (to change the version I tried to commit before) everything works fine. I think that when I choose "Accept Current Change" and try to stage merge changes the editor (or Git?) doesn't add the file to the STAGED CHANGES because it's identical to the version previously committed, and doesn't update the git status, that remains stuck in merge conflict.

The workaround of adding additional chars to the previous version when merging works fine, but I need to know if it's a bug or I'm missing some steps when merging.

If there's a solution please reply also in the same Stack Overflow question, to help other people resolving this issue.

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

@joaomoreno
Copy link
Member

/duplicate #60149

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 9, 2018
@vscodebot
Copy link

vscodebot bot commented Oct 9, 2018

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Oct 9, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants