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操作系統時的命令: 強制性寫入文件並退出。)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM