Git commit opens blank text file, for what?

前端 未结 17 974
长情又很酷
长情又很酷 2020-12-22 18:33

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.

17条回答
  •  抹茶落季
    2020-12-22 18:58

    The text file that is being opened is a summary of the current commit operation. The git commit drops you into this file so the you can add a commit message at the top of the file. Once you've added your message just save and exit from this file.

    There is also a "-m msg" switch on this command that allows you to add the commit message on the command line.

提交回复
热议问题