windows - Windows 10 cmd 中 "git commit --amend"打开的这个编辑器是什么,我该如何使用它?

标签 windows git vim cmd text-editor

Editor opened by default when using "git commit --amend" in Windows 10 cmd.

当我尝试编辑 GIT 提交消息时,Windows 10 cmd 默认会打开此编辑器。你能告诉我那是什么以及我如何使用它吗?谢谢。

最佳答案

Vim ,Git 安装中的默认编辑器。如果您不会使用它,则很难使用!它不像其他编辑器(如 Notepad++、Emacs 或 Sublime Text)那样简单,尽管它非常强大,并且当你掌握它(需要几个月的努力!:))时,你会变得非常高效。

不过,您可以轻松地配置 git 以使用其他编辑器。启动命令行并输入:

git config --global core.editor notepad

现在 Windows 记事本是您在 git 中的默认编辑器。您可以轻松地将其更改为您选择的任何编辑器。参见 hereherehere .

顺便推荐你put the time and learn Vim! You'll not regret it :)

关于windows - Windows 10 cmd 中 "git commit --amend"打开的这个编辑器是什么,我该如何使用它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41355723/

相关文章:

linux - 在 vim 上安装 perlsupport 时出现 "perlsupport is not recognized."

windows - 在批处理文件中使用重定向

c++ - TCHAR[] 转换为字符串

windows - Windows 上的 Mongodb 性能

git - 为什么 GIT 从 bare repo 导出时报告 "fatal: This operation must be run in a work tree"?

git - 强制删除 Git 中的一个分支?

git rebase 开发分支

bash - 总是提示在 git 中输入 stash 消息

Vim 默认 map 领导者绑定(bind)

windows - OSX 和 Windows 上的文本之间存在 1 像素垂直差异