TortoiseGit-git 没有完全退出(退出代码 1)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22165953/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 17:50:34  来源:igfitidea点击:

TortoiseGit-git did not exit cleanly (exit code 1)

gittortoisegit

提问by Nevaeh

I got this message when i tried to create repository by using Git clone.

当我尝试使用 Git 克隆创建存储库时收到此消息。

git did not exit cleanly (exit code 1)

How to fix this?

如何解决这个问题?

回答by Sahadevan

Try these two commands in git bash:

在 git bash 中尝试这两个命令:

1) git gc --force

1) git gc --force

2) git fetch -p

2) git fetch -p

回答by RenScorch

Right from my experience, I most often get this when I have locally changed files that will be over ridden by the pull, you need to stash or move the files before you can pull it.

根据我的经验,当我在本地更改了会被拉动覆盖的文件时,我最常遇到这种情况,您需要先存储或移动文件,然后才能拉动它。

回答by u8563257

Right-click folder ->TortiseGit ->push-> choose unknown changes 》

右键文件夹->TortiseGit ->push-> 选择未知更改》

回答by Syed Mobarak

Sometimes it happens because of incomplete of some operations such as "stash save". It creates an index.lock file in the .git folder and that causes this error. What you need to do is going in to the .git folder and delete index.lock file and restart what you wanted to do.

有时是由于某些操作不完整而发生的,例如“stash save”。它在 .git 文件夹中创建一个 index.lock 文件并导致此错误。您需要做的是进入 .git 文件夹并删除 index.lock 文件并重新启动您想做的事情。

The .git Folder

.git 文件夹

The index.lock File

index.lock 文件

回答by Natther Shah

  1. Right-click > Revert > Select All
  2. Click OK;
  3. After Revert process is finished, PULL.
  1. 右键单击 > 还原 > 全选
  2. 点击确定;
  3. Revert 过程完成后,PULL。

Problem solved!

问题解决了!

回答by eric more

Right click -> TortoiseGit -> Settings -> Network
SSH client was pointing to C:\Program Files\TortoiseGit\bin\TortoisePlink.exe
Changed path to C:\Program Files (x86)\Git\bin\ssh.exe

回答by user3050590

Actually, this error message just says that there is some problem but no specifications of the problem. So, in my case, it was a pending pull request. I pulled the changes into my repo, and then pushed it again and it worked. Moreover, if there is an error on tortoisegit, I prefer to do the same on console. Console gives more detail error message

实际上,此错误消息只是说存在一些问题,但没有说明问题。所以,就我而言,这是一个待处理的拉取请求。我将更改拉入我的仓库,然后再次推送它并且它起作用了。此外,如果 tortoisegit 出现错误,我更喜欢在控制台上做同样的事情。控制台提供更详细的错误信息

回答by Abraham Brookes

Following this guideI had the same issue. To expand on Eric Moore's ridiculously vague answer,

按照本指南,我遇到了同样的问题。为了扩展埃里克摩尔可笑的含糊回答,

Right click > TortoiseGit > Settings > Network

Right click > TortoiseGit > Settings > Network

Down the bottom in the "SSH" section, hit Browse and find your TortoiseGit\bin\TortoisePlink.exefile. In my case the path was under Programsas opposed to Program Files

在“SSH”部分的底部,点击浏览并找到您的TortoiseGit\bin\TortoisePlink.exe文件。在我的情况的路径是在Programs相对于Program Files

回答by tyrol37

Right-click folder -> TortiseGit -> Clean up.. -> click OK

右键单击文件夹 -> TortiseGit -> 清理.. -> 单击确定

None of the above solutions worked for me but this one did.

上述解决方案都不适合我,但这个解决方案对我有用。

回答by lynn

I was heard that, one of the reasons is , the project is too large, so increasing the post buffer could solve the problem. so open the editSystemWideGitConfig, and add the following statements under [http] , postBuffer = 524288000. maybe work.

听说,原因之一是,项目太大,所以增加post buffer可以解决问题。所以打开editSystemWideGitConfig,并在[http]下添加以下语句,postBuffer = 524288000。也许可以工作。