search

Home  >  Q&A  >  body text

How to submit git always has problems

It is said that it has been updated, but why does the file test.txt still not appear on github?

淡淡烟草味淡淡烟草味2792 days ago625

reply all(6)I'll reply

  • 天蓬老师

    天蓬老师2017-05-02 09:42:55

    The command submitted to the local area is written incorrectly

    It should be like this

    git commit -m "这次的提交说明"

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-02 09:42:55

    git add 只是把代码添加到暂存区,git commit 才是把代码提交到版本库,你使用 git commit 的方法错了,并没有把你的代码提交到版本库,你只需要按照 @东方星痕 和 @xiaocui 的方法 commit 到版本库后再 git push That’s it.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-02 09:42:55

    How to upload code to github. You can refer to this article on how to use Git to upload project code to github

    reply
    0
  • 阿神

    阿神2017-05-02 09:42:55

    Commit usage:
    git commit -m 'Commit information'

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:42:55

    @东星狠 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.

    reply
    0
  • 迷茫

    迷茫2017-05-02 09:42:55

    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.

    reply
    0
  • Cancelreply