WebStorm git difftool -d 立即关闭,无需等待用户 [英] WebStorm git difftool -d closes immediately without waiting for user

查看:32
本文介绍了WebStorm git difftool -d 立即关闭,无需等待用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行 git difftool -d 在 Windows 上打开 WebStorm diff 工具,但内容一启动就消失了.

Running git difftool -d <commit> <commit> on Windows opens the WebStorm diff tool but the contents disappear as soon as it starts.

尝试了 trustExitCode、提示和 bat 文件.

Tried trustExitCode, prompt and the bat file.

[diff]
        tool = webstorm
[difftool "webstorm"]
        cmd = \"C:/Users/<me>/AppData/Roaming/JetBrains/WebStorm 2018.1.2/bin/webstorm64.exe\" diff \"$LOCAL\" \"$REMOTE\"

推荐答案

发生这种情况是因为 JetBrains WebStorm 已经打开,因此 diff 传递到现有实例并且 diff 命令返回.一旦它返回,git 就会进行清理,内容就消失了.

This happens because JetBrains WebStorm is already open so the diff is passed off to the existing instance and the diff command returns. As soon as it returns, git does a cleanup and poof the contents are gone.

解决方案:

  1. 在差异之前关闭 WebStorm.仅在不使用 WebStorm 进行编辑时有用.
  2. 用 sleep 或 cmd//c "pause" 保持外壳.关闭 diff 窗口后,返回 shell 并按 Ctrl+c.或者以 git difftool -d 启动 difftool<提交>&.

  1. Close WebStorm before diff. Only useful if not using WebStorm for editing.
  2. Hold the shell with sleep or cmd //c "pause". After closing the diff window, return to shell and press Ctrl+c. Or start the difftool as git difftool -d <commit> <commit> &.

  • cmd = \"C:/Users//AppData/Roaming/JetBrains/WebStorm 2018.1.2/bin/webstorm64.exe\" diff \"$LOCAL\" \"$REMOTE\&&&&&&&&&睡眠3600

Mac 上的类似问题:使用 IntelliJ 作为 git mergetool 总是一启动就退出

Similar issue on Mac: Using IntelliJ as git mergetool always exits as soon as soon as it starts

这篇关于WebStorm git difftool -d 立即关闭,无需等待用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆