Git push error "git did not exit cleanly (exit code 128)" , how to solve?


When I am trying to push my new commit using Tortoise-Git on server, I am getting this error "git did not exit cleanly (exit code 128)", here is the image of the issue

git-push-error-did-not-exit-cleanly.png

How can I resolve this issue? Any Idea


Asked by:- Sam
0
: 18927 At:- 10/20/2017 11:34:23 AM
Git push error git did not exit cleanly







2 Answers
profileImage Answered by:- jaya

There can be different-different type of resolutions for this same error based on the above error "git did not exit cleanly (exit code 128)"

Here are the few solutions:

  1. Try to configure my git username and email with the following commands:
    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"?
  2. Check if there is "Index.lock" file .git folder, if yes delete it and then try to push it again
  3. If you are on Windows 7 64bit, git-gui gives a good answer: a previous git has crashed and left a lock file.Manually remove it. In some case, there was in .git/ref/heads/branchname.lock.
    Deleting it,  makes error 128 goes away. It surprises that tortoise-git doesn't give such an easy explanation.
  4. Try to simply Stash all your changes and then pull/push again
  5. If any of the above solution doesn't work, Try opening Git Bash and running git there, you might get a better error message.
  6. Error may also occurs probably because your SSH key has been removed/revoked, create new one and add it to your GitHub account.

Thanks.

2
At:- 10/23/2017 11:38:07 AM Updated at:- 11/24/2022 9:52:27 AM


profileImage Answered by:- Sam

I was able to solve this by

  1. uninstalling Tortoisde Git.
  2. removing/deleting Git repository from folder
  3. Installing Tortoise Git
  4. Fetching repository again

Thanks

1
At:- 10/24/2017 7:17:17 AM
although this is not the solution, but it works when there is no option 0
By : pika - at :- 12/14/2017 3:59:38 PM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly