Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I've just discovered Visual Studio Code. Yes, I know I'm years late.

File A gets compared to file B, I select file B to compare and file A gets compared to file B.

This takes me to a new tab with both files represented and differences are marked in different colors depending on the difference type.

I would like to be able to select the code in, let's say, the file B and replace the one in the file A by pressing a button.

Something like UltraCompare, beyond compare and other compare softwares do.

Is there any way to do that?

Thank you all!

What I have tried:

Searching the Internet to try to find the way to do it, but it seems I can't... :(
Posted
Updated 24-Feb-19 8:21am
v2
Comments
[no name] 24-Feb-19 5:27am    
Afzaal Ahmad Zeeshan 24-Feb-19 10:42am    
If you mean to talk about the difference in the version control, then you can either choose to keep the incoming changes, or changes that you have. I don't understand how you mean to apply the changes automatically to apply changes to another file.

Because even in this case, the changes are applied to the same file. Can you please show the expected behavior?
Joan M 24-Feb-19 14:19pm    
File A gets compared to file B, I select file B to compare and file A gets compared to file B.

This takes me to a new tab with both files represented and differences are marked in different colors depending on the difference type.

I would like to be able to select the code in, let's say, the file B and replace the one in the file A by pressing a button.

something like UltraCompare, beyond compare and other compare softwares do.
Richard Deeming 26-Feb-19 10:36am    
It doesn't look like there's anything built-in. There's an open feature request from May 2017[^] to implement this, but no sign of anyone actually implementing it yet.
Joan M 26-Feb-19 10:41am    
:O:O:O

OK, thank you very much Richard, that would be great, I'll explore another way like using a third party software and automate sending the selected files there...

Thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900