Error in git repository:

Asked

Viewed 311 times

3

It looks like I did something stupid with the underlying Git repository and was broken, leaving it invalid.

inserir a descrição da imagem aqui

Error:

error: pathspec 'Development' Did not match any file(s) known to git.

I used these commands, but it had no effect.

rm .git/refs/remotes/origin/development

git fetch

git branch --set-upstream-to=origin/development
  • Can you check if the branch exists remotely?

  • 2

    @Statelessdev Yes, but... I found a faster and more effective solution. I did Git clone again, just copied the folder "node_modules" and pasted. Worked.

  • @Letimberg, as you solved the problem, I suggest creating an answer to your own question, explaining how you solved :)

1 answer

1


There are different reasons for this error to occur.

In your case, it looks like you accidentally removed the development of the repository with git branch -D development. In this case, to solve it would be necessary to recreate the local branch again with:

git checkout -b development

Or, if it’s an alternative, do the git clone again from the repository :).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.