Last active
February 21, 2022 14:41
-
-
Save witoszekdev/c36f9143e589ea6ffb3a06c029a8add1 to your computer and use it in GitHub Desktop.
Revisions
-
witoszekdev revised this gist
Feb 21, 2022 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,8 +32,7 @@ Open `~/.gitconfig` file (it should be in your home directory) in your favourite [mergetool] keepBackup = false [mergetool "webstorm"] cmd = webstorm merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" && read [difftool "webstorm"] cmd = webstorm diff $LOCAL $REMOTE --wait trustExitCode = true @@ -46,7 +45,7 @@ This will use WebStorm as your default mergetool and difftool. > [merge] > tool = pycharm > [mergetool "pycharm"] > cmd = pycharm merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" && read > ``` > The `keepBackup = false` will disable git creating `*.orig` files when performing merge @@ -55,7 +54,9 @@ This will use WebStorm as your default mergetool and difftool. When you encounter merge conflicts just run `git mergetool` to open up WebStorm. Don't worry it won't open the *entire* IDE, just the merge conflict resolution tool. To speed up the startup time of WebStorm keep it open in the backgroud. You don't need to open any project. After you've resolved the conflicts press `Enter` in the commandline. WebStorm will open for each conflicting file. > Wait! Why doesn't VSCode have this feature? > Well... there's [been a proposal from 2017](https://github.com/microsoft/vscode/issues/37350), but since then VSCode team have removed this feature from the roadmap -
witoszekdev revised this gist
Feb 21, 2022 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,6 +29,8 @@ Open `~/.gitconfig` file (it should be in your home directory) in your favourite tool = webstorm [diff] tool = webstorm [mergetool] keepBackup = false [mergetool "webstorm"] cmd = webstorm merge $LOCAL $REMOTE $BASE $MERGED --wait trustExitCode = true @@ -47,6 +49,8 @@ This will use WebStorm as your default mergetool and difftool. > cmd = pycharm merge $LOCAL $REMOTE $BASE $MERGED --wait > ``` > The `keepBackup = false` will disable git creating `*.orig` files when performing merge ## 3. Resolve merge conflict When you encounter merge conflicts just run `git mergetool` to open up WebStorm. Don't worry it won't open the *entire* IDE, just the merge conflict resolution tool. -
witoszekdev revised this gist
Feb 21, 2022 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,9 +49,11 @@ This will use WebStorm as your default mergetool and difftool. ## 3. Resolve merge conflict When you encounter merge conflicts just run `git mergetool` to open up WebStorm. Don't worry it won't open the *entire* IDE, just the merge conflict resolution tool. After youre done resolving conflicts just close the app and it will go to the next conflict. > Wait! Why doesn't VSCode have this feature? > Well... there's [been a proposal from 2017](https://github.com/microsoft/vscode/issues/37350), but since then VSCode team have removed this feature from the roadmap  -
witoszekdev revised this gist
Feb 21, 2022 . 1 changed file with 8 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,9 @@ Don't like using VSCode merge conflicts resolution? Try WebStorm's instead. ## 0. [Download WebStorm](https://www.jetbrains.com/webstorm/download) or any other Jetbrains IDE. If you don't want to buy Webstorm's licence try [PyCharm Community Edition](https://www.jetbrains.com/pycharm/download) instead. ## 1. Generate shell scripts @@ -49,4 +49,9 @@ This will use WebStorm as your default mergetool and difftool. ## 3. Resolve merge conflict When you encounter merge conflicts just run `git mergetool` to open up WebStorm. After youre done resolving conflicts just close the app and it will go to the next conflict.  > Wait! Why doesn't VSCode have this feature? > Well... there's [been a proposal from 2017](https://github.com/microsoft/vscode/issues/37350), but since then VSCode team have removed this feature from the roadmap -
witoszekdev revised this gist
Feb 21, 2022 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ <p align="center"> <img width="400" src="https://upload.wikimedia.org/wikipedia/commons/5/59/WebStorm_logo.svg" alt="WebStorm"> </p> <p align="center"> @@ -16,6 +16,10 @@ or any other Jetbrains IDE. If you don't want to buy Webstorm's licence try PyCh Open your Jetbrains Toolkit and enable generation of shell scripts. Provided the folder that exists in your `$PATH`. I've used `/usr/local/bin`. <p align="center"> <img height="500" src="https://gist.github.com/taniotanio7/c36f9143e589ea6ffb3a06c029a8add1/raw/3140cd79c86771c6419e39b0a3978600559e5acd/jetbrains-toolkit.png" alt="Configuration inside Jetbrains Toolkit application" /> </p> ## 2. Edit `.gitconfig` Open `~/.gitconfig` file (it should be in your home directory) in your favourite editor and add this configuration -
witoszekdev revised this gist
Feb 21, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
witoszekdev created this gist
Feb 21, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ <p align="center"> <img width="400" src="https://upload.wikimedia.org/wikipedia/commons/5/59/WebStorm_logo.svg"> </p> <p align="center"> <b>as git mergetool</b> </p> Don't like using VSCode merge conflicts resolution? Try WebStorm's instead. ## 0. Download WebStorm or any other Jetbrains IDE. If you don't want to buy Webstorm's licence try PyCharm Community Edition instead. ## 1. Generate shell scripts Open your Jetbrains Toolkit and enable generation of shell scripts. Provided the folder that exists in your `$PATH`. I've used `/usr/local/bin`. ## 2. Edit `.gitconfig` Open `~/.gitconfig` file (it should be in your home directory) in your favourite editor and add this configuration ```properties [merge] tool = webstorm [diff] tool = webstorm [mergetool "webstorm"] cmd = webstorm merge $LOCAL $REMOTE $BASE $MERGED --wait trustExitCode = true [difftool "webstorm"] cmd = webstorm diff $LOCAL $REMOTE --wait trustExitCode = true ``` This will use WebStorm as your default mergetool and difftool. > Note: If you're using different Jetbrains IDE use it's name instead of `webstorm`. For example, for PyCharm: > ```properties > [merge] > tool = pycharm > [mergetool "pycharm"] > cmd = pycharm merge $LOCAL $REMOTE $BASE $MERGED --wait > ``` ## 3. Resolve merge conflict When you encounter merge conflicts just run `git mergetool` to open up WebStorm. After youre done resolving conflicts just close the app and it will go to the next conflict.