VSCode editor: not seeing Git merge difference in file

Viewed 1385

So I'm testing git merging and something weird happens.

I basically created a new file in master called test.txt.

  • I created and switch to a branch called test.
  • Add text "test branch" and commit
  • Then I switch back to master branch, add text "master branch" and commit.
  • Then switch back to test and do git merge master.

Terminal output is as expected. enter image description here However, when I open vscode and try to resolve the problem, I could only see it denotes there's a conflict but without anything such as "incoming changes".

View in normal editor:
view in normal editor

Changed in master branch:
changed in master branch

Changes in test branch:
changes in test branch

I didn't want to attach the files initially, since many may be concerned about virus. However, I couldn't find any other way to replicate this problem. So I would do that. My apologies in advance. Maybe opening this in a sandbox is a good idea. But I don't expect many replies really, it's a bit too demanding. (This zip file is evolved from Mosh's git class. Don't know if I can paste the link here lol) https://drive.google.com/file/d/1UKLm3cql5jbo7uyJWsUx6YHIamWbWjA8/view?usp=sharing

This problem only occurs on this particular project. So it wouldn't influence much. But I feel it's good to know why this happens. Thanks!

1 Answers

By double-clicking on the test.txt file which has the ! indicator, it should open it with the merge conflicts decoration (Current changes / Incoming changes)

That would be the first test.txt on the left side of the editor.

Related