It is said that it has been updated, but why does the file test.txt still not appear on github?
The command submitted to the local area is written incorrectly
It should be like this
git commit -m "這次的提交說明"
git add
只是把代碼添加到暫存區(qū),git commit
才是把代碼提交到版本庫,你使用 git commit
的方法錯了,并沒有把你的代碼提交到版本庫,你只需要按照 @東方星痕 和 @xiaocui 的方法 commit
到版本庫后再 git push
That’s it.
How to upload code to github. You can refer to this article on how to use Git to upload project code to github
@東星狠 and @xiaocui should be right. I would also like to add that before submitting, you can
git status
Check the status. If no file is listed, it means it has been submitted.
When you git commit, git calls the nano editor for you to edit the commit message. But you haven't finished editing, so git commit is waiting for you.
In the nano editor, when the editing is completed, please save and exit (press Ctrl-X according to the prompts and then select save as prompted). You press Ctrl-Z, which means "suspend" nano - that is, tell it that you have something to do now and don't want to deal with it for the time being. Use the fg command to go back and continue the operation.