git - 将 Visual Studio Code 设置为 OSX 上的全局 Git 编辑器

标签 git macos visual-studio-code

我想将 VS Code 设置为我的默认 git 编辑器,用于执行 rebase 等命令。这似乎没有记录在 VS 代码网站上。我发现了一个有关在 Windows 上执行此操作的 SO 问题,这听起来似乎取得了不同程度的成功:How to use Visual Studio Code as Default Editor for Git

有人在 OSX 上管理过这个吗?

最佳答案

这对我有用。

Install "code" from VSCode commander (Shift + Command + P)

搜索:

Shell Command: Install 'code' command in 'PATH'

安装它。

之后……在终端上使用新编辑器运行命令以配置 git:

$ git config --global core.editor "code --wait"
$ git config --global -e

关于git - 将 Visual Studio Code 设置为 OSX 上的全局 Git 编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34746045/

相关文章:

git - 保持 .git 尽可能小

git - 由于 "port 443: Connection timed out",Docker 构建失败

ios - VPN 加密是否在提供商方面有效?还是客户端? Private Internet Access 使用什么?

visual-studio-code - Visual Studio Code 禁用自动关闭标签

visual-studio-code - 无法在 VS Code 中启动客户端 ESLint 消息

visual-studio-code - 如何将 ESLInt 自定义规则目录添加到 VSCode

git - git diff 输出中的重音字符

git - 如何列出未包含在任何分支中的提交中的所有标签?

macos - 在 Mac 上设置 git/github : error on reading usr/local/etc/gitconfig

ruby - 如何解决 PATH 中的 Insecure world writable dir/usr,Ruby 模式 040777 警告?