Windows上的Intellij Idea和社区版本的Git Mergetool
我正在使用gitextensions Windows软件与GIT一起使用,并且我将其配置为与Idea的社区版一起使用,将其用作合并工具。 我已经安装了Intellij Idea Community的2022.1版本,
我去了文件夹C:\ users< login>编辑.gitConfig文件 我在其中添加了以下各
[merge]
tool = intellij
[mergetool "intellij"]
cmd = cmd.exe //c "\"C:/Program Files/IntelliJ IDEA Community Edition 2022.1/bin/idea.bat\" merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""
trustExitCode = true
节
I'm using GitExtensions windows software to work with git and i had many trouble configuring it to work with Idea's community edition, to use it as a merge tool.
I've installed version 2022.1 of intelliJ Idea community
I followed the instructions here https://coderwall.com/p/gc_hqw/use-intellij-or-webstorm-as-your-git-diff-tool-even-on-windows but it didn't worked for me for conflict resolution
i went to the folder c:\users<login> to edit the .gitconfig file
and i added the following sections in it
[merge]
tool = intellij
[mergetool "intellij"]
cmd = cmd.exe //c "\"C:/Program Files/IntelliJ IDEA Community Edition 2022.1/bin/idea.bat\" merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""
trustExitCode = true
but nothing was launched when launching the mergetool
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在Windows 11上使用gitextensions在Windows 11上发现了这对我而言。
我不再需要首先指定cmd.exe应用程序,但是我必须使用“路径”值。这也可以通过GiteXtensions中的“设置Git-&gt; config”菜单设置,如果在下拉式选择器中未列出,则可以在其中手动输入“ Intellij”。
我的.gitConfig文件的底部看起来像这样:
我可以确认difftool命令现在用gitextensions的外部工具为我的diff打开Intellij,但是由于缺乏在我的repo中合并的文件,我尚未尝试合并。
I've found this works for me so far on Windows 11, using GitExtensions.
I no longer need to specify the cmd.exe app first, but I have to use a "path" value. This can also be set through the "Settings-Git->Config" menu in GitExtensions, where you can manually type in "intellij" if it's not listed in the dropdown selector.
The bottom of my .gitconfig file looks like this:
I can confirm that the difftool command now opens IntelliJ for my diffs with an external tool from GitExtensions, but I have yet to try a merge, due to lack of files to merge in my repo.