I tried to merge one file with another file, but there are many HEADs with Accept Current Change | Accept Incoming Change | ...
Is there a way to accept all current changes at once?
I tried to merge one file with another file, but there are many HEADs with Accept Current Change | Accept Incoming Change | ...
Is there a way to accept all current changes at once?
It's very easy just go to vs code and press Ctrl+shift+p (command palette) or go to view and open command palette manually and type "merge" in your command palette, now you can see the Accept all current changes.
select the list of files to resolve from the MERGE-CHANGES section, then right-click your mouse and select Accept all incoming. That should do the trick for all files.
You will need to save the updated files once the conflicts are resolved. Click File and then Save All
Ctrl
key and then choose the option Select All Changes from the cascade menu. All the files will open with unsaved changes. To save all the unsaved files at once, do File > Save All.
Commented
Dec 9, 2020 at 8:37
Select target file, right click and choose 'Accept All Incoming'.
As For VSCode MacOS, I've done Accept All Incoming
from Merge Changes
section, but it didn't affect all (that may be a bug, or I don't know why).
So, I used the conventional way with command line, and it worked.
For accepting all incoming changes,
git checkout --theirs .
or
For accepting all current changes,
git checkout --ours .
P.S. Hope it helps for those who need to solve merging conflict first in any case.
git add --all
which is very confusing... because they are... merged.
Commented
Aug 9, 2022 at 15:38
Merge Changes
section.Open File
from right click menu. It opens all files.Accept All Current
.Save All
from File
menu.Unfortunately, none of the answers here worked for me. However, I was able to accept all incoming changes by running these commands manually.
I was in the conflict state at this point so I had to abort the merge and then pull all "their" (incoming) changes.
git merge --abort
git pull -X theirs