Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In VSCode, when use git compare to previous versions, can I revert one changes back?

Here is the screenshot of what I mean. As I am comparing my working file with previous commit, there are tons of changes. I can navigate to each of the changes by using up/under arrow in top-right corner. But for some changes, I want to revert it back to previous version, now I have to copy the contents from left to right. Is there a better way to do this? I remember pycharm used to have one-click to do this. Git diff

like image 745
StayFoolish Avatar asked Oct 21 '25 13:10

StayFoolish


1 Answers

Right click on the green zone in the right side of the diff: you should see a "Revert Selected Ranges" option.

enter image description here

Selecting that option would revert the right side to the left side content.

like image 108
VonC Avatar answered Oct 23 '25 06:10

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!