[英]What is this editor opened by "git commit --amend" in Windows 10 cmd and how do I use it?
It is Vim , the default editor in Git installation. 它是Vim ,Git安装中的默认编辑器。 It is rather hard to use if you don't know how to use it! 如果您不知道如何使用它,则很难使用! It is not trivial as other editors like Notepad++, Emacs or Sublime Text, though it is very powerful, and when you mastered it (it takes a few month of hard work! :) ), you'l become highly productive. 像Notepad ++,Emacs或Sublime Text这样的其他编辑器并不是一件轻而易举的事情,虽然它非常强大,当你掌握它时(需要几个月的努力工作!:)),你会变得高效。
However you can easily configure git to use another editor. 但是,您可以轻松配置git以使用其他编辑器。 Fire up a command line and enter: 启动命令行并输入:
git config --global core.editor notepad
Now Windows Notepad is your default editor in git. 现在,Windows Notepad是git中的默认编辑器。 You can easily change it to any editor of your choice. 您可以轻松地将其更改为您选择的任何编辑器。 See here or here or here . 看这里 , 这里或这里 。
By the way, I recommend you to put the time and learn Vim! 顺便说一句,我建议你花点时间学习Vim! You'll not regret it :) 你不会后悔的:)
It Vi and you have to write your message. 它Vi你必须写你的消息。
If you are unfamiliar with VI i recommend to go over this interactive tutorial 如果您不熟悉VI,我建议您阅读这个互动教程
i 一世
Write + quit: ESC + : + w + q + Enter 写+退出: ESC + : + w + q + 回车
Write + quit: ESC + : + q + ! 写+退出: ESC + : + q + ! + Enter + 输入
try git config --global core.editor (any editor of your choice or if you have any of the following: Atom / Sublimetext/ notepad++/ notepad / etc)尝试 git config --global core.editor (您选择的任何编辑器,或者如果您有以下任何一种:Atom / Sublimetext/ notepad++/ notepad / etc)
in either Visual studio terminal while coding for git or in any command line.在为 git 或任何命令行编码时在 Visual Studio 终端中。
example:- git config --global core.editor Atom示例:- git config --global core.editor Atom
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.