由于某些原因,当我尝试运行git commit -a时,我没有收到nano底部的常用控件,也无法保存我编辑过的提交消息。输出如下所示:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: app/controllers/photos_controller.rb
# deleted: app/views/comments/edit.js.erb
# deleted: app/views/facets/_old_menu.html.haml
# modified: app/views/photos/uploaded_photo.html.haml
# deleted: config/initializers/delayed_job_config.rb
# deleted: public/images/blue_panel_column.png
# deleted: public/images/embed/add_feature_button.png
~
~
~
~
".git/COMMIT_EDITMSG" 39L, 1947C我已经到处找过了。我不得不手动删除.git/index.lock,如果这可以解释它的话。提前感谢您的建议。
发布于 2011-01-04 21:35:10
嗨,我有几个想法
git commit -a -m "Your message goes here"
希望这能对你有所帮助。
发布于 2011-01-04 21:33:27
这似乎是Mac OS X终端的问题。一些人,但不是所有使用nano的人都遇到过这种情况。
您可以通过键入以下命令来欺骗您的终端,使其认为它是另一个终端:
TERM=VT100
export TERM 浏览终端的设置(或使用其他设置,如xterm或iTerm)。
其他编辑器,如Textmate,vim,BBedit,...好好工作。你一定要坚持使用nano吗?
如果您的提交消息非常短,您可以手动将其附加-m标志:
git commit -am "my commit message."https://stackoverflow.com/questions/4594069
复制相似问题