How can I commit files with git?

前端 未结 9 1718
慢半拍i
慢半拍i 2020-12-07 12:21

None of the tutorials will help!
They all do that thing where they just assume I know what to do..

Currently, my terminal window starts with..

#          


        
相关标签:
9条回答
  • 2020-12-07 12:44

    This happens when you do not include a message when you try to commit using:

    git commit
    

    It launches an editor environment. Quit it by typing :q! and hitting enter.

    It's going to take you back to the terminal without committing, so make sure to try again, this time pass in a message:

    git commit -m 'Initial commit'
    
    0 讨论(0)
  • 2020-12-07 12:51

    I don't know your system environment, but it seems, that you have typed:

    git commit
    

    And your default editor has been launched. In the worst case scenario (for you) it could have been vim :)

    If you don't know how to quit vim, use :q.

    If you have further problems, you could use

    git commit -m 'Type your commit message here'
    
    0 讨论(0)
  • 2020-12-07 12:51

    I faced the same problem , i resolved it by typing :q! then hit Enter And it resolved my problem After that run the the following command git commit -a -m "your comment here"

    This should resolve your problem.

    0 讨论(0)
提交回复
热议问题