Git提交打开空白文本文件,为什么? [英] Git commit opens blank text file, for what?

查看:105
本文介绍了Git提交打开空白文本文件,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在所有Git教程中,我读过他们说过你可以这样做:

  git init 
git添加。
git commit

当我这样做时,我得到一个大的文本文件。这些教程似乎没有解决这个问题,所以我不知道如何处理这个文件或者如何处理它。

解决方案

您可以将提交消息放入此文本文件中,然后保存并退出。



您可以更改git使用的默认文本编辑器这个命令:

  git config --global core.editornano

您必须将nano更改为通常打开文本编辑器的任何命令。


In all the Git tutorials I've read they say that you can do:

git init
git add .
git commit

When I do that I get a big text file opened up. None of the tutorials seem to address this, so I don't know what to do with the file or what to put in it if anything.

解决方案

You're meant to put the commit message in this text file, then save and quit.

You can change the default text editor that git uses with this command:

git config --global core.editor "nano"

You have to change nano to whatever command would normally open your text editor.

这篇关于Git提交打开空白文本文件,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆