Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty messa

1.git提交的时候遇到:

# Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.的问题,

 

提示你说是因为代码中带有注释,需要去掉注释,但是完全不需要这样,在git commit文件时指令为git commit -m “文件名”,这样就可以将文件提交到github里面


2.然后git push -u origin master即可

解决办法 :
方法一
1、直接关闭当前窗口,再重新打开新的窗口;
2、接着就可以继续操作;但个人觉得这个方法不是办法中的办法,迫不得已,太麻烦了。(个人不建议)

方法二:
1、当出现上述情况,可按键盘左上角的“Ese”退出键;
2、输入“:wq”,注意是英文输入状态下的冒号,然后按下“Enter”键即可。(个人觉得这个方法好, “ :wq”是啥意思呢???学Linux操作系统时的命令: 强制性写入文件并退出。)

posted @ 2019-08-09 09:05  努力~努力再努力~  阅读(3922)  评论(0编辑  收藏  举报