How to accept all current changes in Vscode at once?

Jomar M. blog author

Jomar M


March 26, 2024

Recently, while working on a project, I encountered significant conflicts between the dev and stage branches in the package-lock.json file. We all know how large these files can be, and merging conflicts within them is sometimes tedious, not to mention that the process is really slow.


There must be a better way to do this. Luckily, there is, but this approach assumes that you know exactly what changes you've made and that you're pretty confident with them.

  1. Open VScode and navigate to the file that has merge conflicts.
  2. Press CTRL + SHIFT + P.
  3. Type 'Merge'.
  4. Choose the option that best suits your needs from the available options."


From here, you can either accept all incoming changes at once or accept all current changes. This method is much quicker and more efficient.

Happy Coding!