本文介绍了为什么git挂起 - 必须在命令后按两次输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑:摘要:在Git中输入的每个命令都会产生一个悬挂的光标,如果在按下Enter之前输入了任何内容,则会显示bad input。没有命令会产生任何结果。我尝试了新的安装方式,但没有任何结果。



我完全 Git。不知道我在做什么。 (我在Mac上)



我遵循网站上的基本指示:

  touch README.md 
git init
git add README.md
git commit -m第一次提交
git remote add origin git @ github。 com:aerovistae / MetPetDB-Mobile.git
git push -u origin master

但as一旦我输入git init,终端就会挂起。我按下回车键,没有任何反应,提示符不会开始新行......它只是开始一个没有闪烁光标的空白行。我再次按下输入按钮,提示返回,在终端上跳过一行,现在正在等待我的下一个命令。



我不太明白发生了什么事在这里,我不知道是否有什么不对。



编辑:



Git已安装从主下载页面。





在我输入 git init 后,我得到闪烁的光标一个空白的新行,过了一会儿,我犹豫地输入了 Testing ,然后再次输入。然后,它在下一行中吐出 bad input:Testing 并向我显示新的提示。



I试图重新安装,但无济于事。我尝试其他的git命令,比如 git config --global user.nameMeeeee但是没关系。它们都产生相同的挂起。 解决方案

考虑到你在OS X上,并且在的,这是可能的


  • 你有一个别名对于git,调用 credential-osxkeychain 。

    请参阅:






  • 或者你有几个l git installed:




Edit: Summary: Every command entered in Git produces a hanging cursor which then says "bad input" if anything is typed before enter is pressed. No commands produce any results. I tried a fresh install with no results.

I am completely new to Git. No idea what I'm doing whatsoever. (I'm on a Mac)

I was following the basic instructions on the site:

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:aerovistae/MetPetDB-Mobile.git
git push -u origin master

But as soon as I type in "git init", the terminal hangs. I press enter, nothing happens, the prompt doesn't start a new line...it just starts a blank line with no blinking cursor. I press enter a second time, the prompt returns, having skipped a line in the terminal, and now waiting for my next command.

I don't really understand what's going on here, and I'm not sure if something's wrong or not.

EDIT:

Git was installed from the main downloads page.

http://git-scm.com/downloads

After I hit enter on git init I get the blinking cursor on a blank new line, and after a moment I hesitantly typed in Testing and hit enter again. It then spat out, on the next line, bad input: Testing and showed me a new prompt.

I tried reinstalling, but to no avail. I try other git commands, like git config --global user.name "Meeeee" But it doesn't matter. They all produce the same hanging.

解决方案

Considering you are on OS X, and after Keith Thompson's comment, it is possible

  • or you have several git installed:

这篇关于为什么git挂起 - 必须在命令后按两次输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 18:52