3

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

redYmir
  • 113
  • 5

2 Answers2

0

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
El0din
  • 3,208
  • 3
  • 20
  • 31
0

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 !!!

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 16 '22 at 00:18