How to restore VSC conflict highlighting? - visual-studio-code

So in visual studio code when you merge and have conflicts, visual studio code will highlight the current change in green and the incoming change in blue. However when you have different conflicts in many files, after resolving the first file and I go to the next one, these highlightings don't show up anymore. I still have the HEAD >>>>>> ======= and all that stuff that tells me where the conflicts are but it is not in color and the buttons to "Accept Current"/"Accept Incoming"/"Accept both" are gone as well. Does anyone know how to tell visual studio code to show those highlightings again in the rest of the files?

Go to Settings -> Extensions -> Git
or search for merge editor
Deselect Git: Merge Editor

** Update **
VS Code just released a fix in v1.71 that restores the old conflict decorators if the Open Merge Editor is selected.
https://code.visualstudio.com/updates/v1_71#_merge-editor-improvements

Related

How to change VS Code's merge conflict layout?

I use VS CODE for version control (using git).
Every time I had a conflict, VS CODE showed me with a layout where I could see all the changes in one window:
However, with no advice, it change to a weird 3 windowed design where I can't understand anything.
Does someone know how can I go back to the first design?
Go to VS Code settings
Untick the Git: Merge Editor setting
Now you should be able to see the previous merge layout.
This feature (3 way merge editor) can be enabled by setting git.mergeEditor to true and will be enabled by default in future releases.
You can set it back to false to go back to the previous design as you want.
This new 3-way merge editor seems to have a terrible UX issue. For me simply switching to merge editor to 'false' doesn't work as below:
git.mergeEditor = false
After this editor completely stopped showing me any merge conflict line.
I have to finally do like this to revert back to original merge conflict view.
"diffEditor.codeLens": true,
"git.mergeEditor": false
Hit ctrl+shift+p to open command pallet and open the settings json by typing Preferences: Open User Settings (JSON) (or start typing 'settings' and this will come up)
In the main JSON object add "git.mergeEditor": false (insert comma beforehand if needed)
Hit ctrl+shift+p and type Developer: Reload Window to reload the windo.
The old type of merge editor should be back.. but you may need to wait a minute to get the full UI back (on my machine, the accept incoming buttons etc. didn't come back for a little).
Update 2023 in case the conflict UI has crashed/not displayed
When you rebase a file with embedded conflicts within conflicts VScode's in- file-conflict-display(blue/green UI) might glitch due to too-many git markers present, rendering merge impossible without CLI.
Apply workaround by enabling and switching to 3 way conflicts window.
enable merge editor (by searching the settings or modifying vscode config file locally)
use vscode's merge display by going to Source Control tab then clic the file with ! exclamation mark before the name of the file
solve the maximum number of conflict using the new 3 windows conflict UI (remember current and incoming are inverted in case of rebasing)
go back to normal file UI and the classic in-file-conflict-UI (green/blue) should be back online
finally git add . && git rebase --continue && :wq (vim) in case of rebase to pass to the next commit to handle.
Rule of Thumb: Remember to always create a temporary local branch of your feature before merging/rebasing your feature branch before PR. This will be used as backup to keep the design intent in mind. Then always run code(and lint) to check for obvious typos/merge artifacts (ie these git flags or unclosed loops/functions).

VSCode: How to see blocks with a list of branches, stashes, etc. again?

With one of the latest updates to the VSСode, the expandable blocks with the list of branches, stesh, local history, etc. disappeared in the version control panel.
And if you right-click on the modified files, there is no stash changes option.
Questions:
How to see blocks with a list of branches, stashes, etc. again.
How to return to the context menu of the modified files the item for working with git stash?
UPD 21.08.22: the problem was in GitLens, which I removed. Reinstalling GitLance brought back all the items I needed.
Go to vs code extensions, install the gitLens extension pack.
gitLens
Latest version of vscode does not hide this. If you want to bring it back, you just need to Right Click on SOURCE CONTROL bar then pick the feature you want to display.
the problem was in GitLens, which I removed. Reinstalling GitLance brought back all the items I needed.

How can I disable problems for virtual files in VSCode?

I am working on a .Net Core application and I keep running into this problem where I get all sorts of random issues appearing in the Problems window in VSCode for "__virtual" files. There are no problems in the actual razor page (.cshtml) and everything is working how we would expect. Is there a way in VSCode to mass ignore all problems from __virtual files?
This started to happen to me after the latest update of Visual Studio Code.
My solution was to configure file association for .razor__virtual.html files into text
Open visual studio code
Click Settings icon in the left bottom and click Settings
In the search box, search for Files: Associations (Copy-paste this)
Click [Add Item] button and enter **/*.razor__virtual.html for key, text for value.
It should look like this,
Done!

Eclipse code line change

I often switch from Eclipse to Netbeans and back. There is a feature in Netbeans that allows you to see changed lines in code due to repository.
Example:
Is there something similar in Eclipse?
Yes, right click the file Team -> Show Annotation... When you hover over the colored line numbers you see the committing user and the commit message. If it is a local change it is just white.

How do I resolve conflicts in TFS?

How do I resolve conflicts in TFS?
I must have forgotten to do a recursive get before editing a file. Whatever the cause is, I must now figure out how to resolve a conflict.
When I click on the workspace to performa check-in. One of the files as a two-way pointing arrow which I guess must mean there is a conflect.
When I click to perform a "Check In" a message box appears that tells me:
"No files checked in due to conflicting changes. Please use Conflicts Channel to resolve conflicts and try again".
So I googled "Conflicts Channel TFS" and I got some results but all of the results only gave suggestions, like, Click on "Automatic Resolve". The problem is that I do not see any of the menu commands or buttons to ckick on that they suggest.
Try getting latest on the file. That should trigger the conflict resolution screen.
Open the View menu in Visual Studio from the main tool bar. Scroll down to 'Other Windows', then open the 'Pending Changes' window.
On the right side of this Pending Changes window, there are 5 Buttons, each with an icon. The 5th one down is the Conflicts button. This will show you all the conflicts and will allow you to resolve them here.