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

2019-02-07 17:03发布

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

git did not exit cleanly (exit code 1)

How to fix this?

16条回答
何必那么认真
2楼-- · 2019-02-07 17:21

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

查看更多
该账号已被封号
3楼-- · 2019-02-07 17:21

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

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

查看更多
Explosion°爆炸
4楼-- · 2019-02-07 17:27

Try these two commands in git bash:

1) git gc --force

2) git fetch -p

查看更多
放荡不羁爱自由
5楼-- · 2019-02-07 17:27

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.

查看更多
小情绪 Triste *
6楼-- · 2019-02-07 17:28

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

Right click > TortoiseGit > Settings > Network

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

查看更多
聊天终结者
7楼-- · 2019-02-07 17:29

For My case i did 3 steps to achieve the sucessful build.

  1. revert all the local changes if any (or just keep a copy of it in case you need it for future use)

  2. Do a git clean up, do a pull and check the logs for error

  3. GO to the git bash option and the error i was getting in log in above stem (i my case ) as "error: cannot lock ref and the branch details", so in the git bash i ran the following command git update-ref -d 'Branch_name'

For example if the error was something like **

  • ISSUE

**error: cannot lock ref 'refs/remotes/origin/EXMPLEISSUE/EXAMPLE-1011_DEMO_web_interface_DOES_NOT_GET_GIT_UPDATE':

Then i ran following command git update-ref -d 'refs/remotes/origin/EXMPLEISSUE/EXAMPLE-1011_DEMO_web_interface_DOES_NOT_GET_GIT_UPDATE'

We have to ensure all the error in logs to be solved similarly before getting a successful pull by doing git update-ref -d 'Branch_name' and finally i can get the take the successful pull from git.

查看更多
登录 后发表回答