SourceTree git "clone from url" gives me fatal error

1k Views Asked by At

I tried to add a new repository with the option "clone from url". It start the download but, almost immediately, it stops. I cannot see the old branches, it's like a new one. After some time, gives me this fatal error: 'git log' failed with code 128:'fatal: bad revision 'master'

How can I fix his bug? Thanks for reading and for the answers

2

There are 2 best solutions below

0
El0din On

This answer might have the solution you're looking for:

https://community.atlassian.com/t5/Sourcetree-questions/Re-git-status-failed-with-code-128-error-bad-signature-fatal/qaq-p/207698/comment-id/6023#M6023

If the problem is with the index as the staging area for commits (i.e. .git/index), you can simply remove the index (make a backup copy if you want), and then restore index to version in the last commit. On SourceTree shell run:

On OSX/Linux:

rm -f .git/index
git reset

On Windows:

del .git\index
git reset
1
Vignesh MuthuKumar On

If you are using SourceTree for your Git, then go to "Actions" --> Open in Terminal or (Shift + Alt + T). Terminal will get opened then type "$ git config --global --add safe.directory D:/Users/userName/work/workspace/workspace"

It works !!!