git commit命令无限期挂起 [英] git commit command hangs indefinitely
问题描述
当我尝试使用git commit
进行提交时,崇高文本编辑器确实打开了,我编写了提交消息,并保存并关闭了编辑器,但是更改尚未提交.终端挂在git commit
上.
When I tried to make a commit using git commit
, the sublime text editor did open, I wrote the commit message and saved and closed the editor but the changes were not being committed. The terminal hanged at the git commit
.
我搜索了网络,发现一个有相同问题的人,并且应用了相同的修复程序,却没有考虑任何事情.我运行了命令:
I searched the net and found someone with the same issue and applied the same fix without thinking anything. I ran the command:
git config --global core.editor "mate -w"
现在运行git commit
时出现新错误:
and now I have a new error when I run git commit
:
mate -w:1:mate -w:mate:找不到 错误:编辑器"mate -w"存在问题. 请使用-m或-F选项提供消息.
mate -w: 1: mate -w: mate: not found error: There was a problem with the editor 'mate -w'. Please supply the message using either -m or -F option.
请帮助.我对git并使用Ubuntu 14.04非常陌生.
Please help. I am very new with git and using Ubuntu 14.04.
推荐答案
可能是您有一个执行长时间运行任务的预提交钩子.
It could be you have a pre-commit hook that performs a long-running task.
检查.git/hooks/pre-commit
并查看其作用.
这篇关于git commit命令无限期挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!