A VSCode extension to help developers resolve so many merge conflicts interactively and systematically, to lighten this tedious work and avoid making mistakes.
- Group related merge conflicts and order them topologically, related means: depending/depended, similar, or close.
- Interactively suggest the next related conflict to resolve by the way.
- Suggest resolution strategy based on already resolved relevant conflicts.
- Java
- TypeScript
- JavaScript (testing)
- Python (doing)
- OS: macOS/Linux/Windows
- VSCode: ^1.45.0
- Install from marketplace: search&install
SoManyConflict
in the VSCode extension marketplace. - Install from vsix: build&download the installation package
.vsix
(see following), and runExtension: Install from VSIX...
in VSCode extension sidebar.
- Open a Git repository with unresolved merge conflicts in VSCode.
- Click the button in the side bar, or invoke by command starting with
somany
. - Start resolving by starting from the grouped and ordered related conflicts.
- Navigate and jump to related conflict blocks to resolve by the way.
- After all conflicts resolved, go on committing the changes.
- VSCode ~1.56.0
- Node.JS ^14.16.0
- Python ^3.7.0
- xcode-select ~2373
- Yarn ^1.16.0
- VSCode ~1.56.0
- Node.JS ^14.16.0
- Python ^3.7.0
- Visual Studio Build Tools 2017
- Yarn ^1.16.0
- Install XCode command line tools:
xcode-select --install
- Clone repo and open in VSCode.
- Open the terminal, install Emscripten (the compiler toolchain to WebAssembly): https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install
- In the same terminal and under the project root, run
yarn
ornpm i
to download dependencies. - Press
F5
to run and debug extension. - In the new window, press
F1
orCmd+Shift+P
and invoke commandsomany
.
Trick: When debugging, install the extension
Auto Run Command
and configure it inCode-Preferences-Settings
, you can avoid manually invoke the command:
"auto-run-command.rules": [
{
"condition": "isRootFolder: XXX",
"command": "somanyconflicts.start",
"message": "Running So Many Conflicts"
}
],
- Install windows-build-tools:
npm install --global windows-build-tools
- Clone repo and open in VSCode.
- Open the terminal, install Emscripten (the compiler toolchain to WebAssembly): https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install
- In the same terminal and under the project root, run
yarn
ornpm i
to download dependencies. - Press
F5
to run and debug extension. - In the new window, press
F1
orCtrl+Shift+P
and invoke commandsomany
.
- If you find that electron takes too much time to install when running
yarn
, stop it withCommand+C
and remove"electron": "13.1.7"
frompackage.json
first, then run the following command to install modules:
yarn
ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/ yarn add -D electron@13.1.7
- [Deprecated] Treesitter is a native module that must be rebuilt locally after installed to match the electron node version of VSCode (see electron-rebuild). However, directly running rebuild will result in an error about C++ version. There is an unmerged PR and a related issue for node-tree-sitter, for now you need to follow these steps to successfully rebuild it:
- Edit
node_modules/tree-sitter/binding.gyp
:
'xcode_settings': {
- 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
+ 'CLANG_CXX_LANGUAGE_STANDARD': 'c++14',
},
- Rebuild it with:
./node_modules/.bin/electron-rebuild
Note that, unfortunately, each time you run yarn, you need to rebuild treesitter as above :-(
Conflicts parsing part is borrowed from Conflict Squeezer, thanks for the nice work!