Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code compare changes, how to accept/reject

Today I discovered that VS Code automatically recognizes when I open a file that has merge conflicts. In the beginning, I see several commands available, including "compare changes". I like this display far better than the other, I would like to work from it. It shows the changes at a much finer granularity. But now, I can't see buttons to accept or reject changes. Are they hiding in plain sight somewhere on this screen? Where to go from here?

Part of the issue is, I would like to edit through the conflict on a line-by-line basis, not accepting or rejecting the whole change as it was presented to me. Can this view help me with that?

A single line I would like to accept

like image 978
Joymaker Avatar asked Sep 26 '26 19:09

Joymaker


1 Answers

Control buttons only appear when you move your mouse pointer right between the two blocks with some differences.

VSCode screen displaying diff controls

like image 129
Luke Avatar answered Sep 28 '26 21:09

Luke



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!