[英]How to close git commit editor?
I just executed a command $ git commit
and it opens a new editor.我刚刚执行了命令$ git commit
并打开了一个新的编辑器。 But I'm trying to close that new commit editor.但我正试图关闭那个新的提交编辑器。 How to do this?这个怎么做? I'm using Git for Windows.我将 Git 用于 Windows。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I'm new to git and learning from a PDF.我是git的新手,正在学习PDF。 I just executed a command $ git commit
and it opens a new editor.我刚刚执行了一个命令$ git commit
,它打开了一个新的编辑器。 But I'm trying to close that new commit editor.但是我正在尝试关闭该新的提交编辑器。 How to do this?这该怎么做? I'm using git on windows.我在Windows上使用git。
I encountered the similar issue just in case this helps you.我遇到了类似的问题,以防万一这对你有帮助。
When you hit the command git commit --amend
.当您点击命令git commit --amend
。 It opens a default editor.它会打开一个默认编辑器。 Now, the question was how to close this.现在,问题是如何关闭它。 I have just resolved this so here it is if it helps:我刚刚解决了这个问题,所以如果有帮助的话:
press Ctrl + X
按Ctrl + X
Press Y
to select Yes按Y
选择是
Press Ctrl + M + A
(This command saves the commit message you are editing and brings you out of editor)按Ctrl + M + A
(此命令保存您正在编辑的提交消息并使您退出编辑器)
Try git log
command to verify your changes尝试git log
命令来验证您的更改
Somehow my terminal on Mac opens Joe editor when git commit
.当git commit
时,我在 Mac 上的终端以某种方式打开了 Joe 编辑器。 I had to press Ctrl + KH
to get to the help, this informed me to press Ctrl + K + X
to exit.我必须按Ctrl + KH
才能获得帮助,这告诉我按Ctrl + K + X
退出。
git commit --amend, press 'i' and edit your commit message, Ctrl+save, Ctrl+c, :wq, git push origin HEAD:refs/for/master git commit --amend,按“i”并编辑你的提交信息,Ctrl+save,Ctrl+c,:wq,git push origin HEAD:refs/for/master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.