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

后端 未结 19 2114
花落未央
花落未央 2020-12-30 18:43

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?

相关标签:
19条回答
  • 2020-12-30 19:38

    Try these two commands in git bash:

    1) git gc --force

    2) git fetch -p

    0 讨论(0)
  • 2020-12-30 19:40

    Actually, the easiest way to determine the error is to use 'Git Sync ...' then perform a pull/push from there - the error message is far more meaningful (i.e. there is one) and at least in my case, my -1 was due to a network path issue

    0 讨论(0)
  • 2020-12-30 19:44

    first login on git then before push take the pull. issue will be resolved

    0 讨论(0)
  • 2020-12-30 19:46

    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

    0 讨论(0)
  • 2020-12-30 19:46

    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.

    0 讨论(0)
  • 2020-12-30 19:47

    This is Just because you have made changes on your remote repository which was not pulled on your local repository.

    To resolve simply 1. Pull from remote repository to local repository. It will not undo any changes locally. It will just update local repository. 2. Now push the changes to remote repository. It will work

    0 讨论(0)
提交回复
热议问题