How do I fix a failed git commit?

前端 未结 4 775
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 09:14

I am new to git and was trying to commit, but I got stuck in what looked like vi which I\'m not familiar with. I managed to get out of it, but I think

4条回答
  •  无人及你
    2021-02-05 10:03

    Assuming you're not doing anything with git at the moment (i.e., not doing a push or pull or running a git script in the repository, for any reason), you could just remove the lock file manually and try again.

    Also, git expects a "commit message" describing your changes. Assuming you don't want an editor to open, you can provide an inline message using the -m option:

    git commit -am "Changed this, that, and the other thing"
    

提交回复
热议问题