Featured image of post 使用 VS Code 作为你的 Git 编辑器

使用 VS Code 作为你的 Git 编辑器

在使用 git rebase 命令修改 Git 提交记录时,通常,我们会使用 Vim 等系统编辑器编辑。Vim 等编辑器并不好用,出现单词错误时,也没有有好的提示。对于经常使用 VS Code 的同学来说,可以将 VS Code 设置为 Git 的默认编辑器,使用 VS Code 来代替 Vim。

运行下面命令即可

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

效果

Licensed under CC BY-NC-SA 4.0