使用pull命令时,github锁定了mac终端 [英] github locks up mac terminal when using pull command

查看:171
本文介绍了使用pull命令时,github锁定了mac终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习github on mac(命令行),每当我做 git pull origin master 我得到这个

 #请输入一条提交消息来解释为什么需要这种合并,特别是如果它将一个更新的上游合并到主题分支中。 

#以'#'开始的行将被忽略,并且一个空的消息将中止
#提交。
















.git / MERGE_MSG7L,293C

终端似乎锁定并且不允许我立即输入任何内容,然后当它终于允许我输入文本时,它似乎不识别git命令。

这是git中的错误还是我错过了一些东西?

解决方案

你在文本编辑器中,vim!这是一个 modal 文本编辑器,因此您需要: 输入插入模式

  • 现在您可以键入您的消息,就好像您使用的是正常的
    (非模态)文本编辑器。 / li>
  • 然后输入<$ c $>
  • 然后按 esc 返回命令模式

  • 最后:q :后跟输入 >然后输入退出。


  • I'm in the process of learning github on mac (command-line) and whenever I do git pull origin master i get this

    # Please enter a commit message to explain why this merge is necessary,
    # especially if it merges an updated upstream into a topic branch.
    #
    # Lines starting with '#' will be ignored, and an empty message aborts
    # the commit.
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ".git/MERGE_MSG" 7L, 293C
    

    the terminal seems to lock up and doesn't allow me to enter anything immediately, then when it finally does allow me to enter text it seems like it doesn't recognize git commands.

    Is this a bug in git or am i missing something?

    解决方案

    You're in the text editor, vim! It's a modal text editor, so you would need to:

    1. Press i to enter insert mode.
    2. Now you can type your message, as if you were in a normal (non-modal) text editor.
    3. Press esc to go back to command mode.
    4. Then type :w followed by enter to save.
    5. Finally :q followed by enter to quit.

    这篇关于使用pull命令时,github锁定了mac终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆