I have resolved the issue as follow Problem: git checkout develop Error: pathspec 'develop' did not match any file(s) known to git (Develop is branch name)
Solution:
git show-ref
This will show the SHA ID of all the branchs including develop
cat .git/refs/head/develop
In my case the SHA ID in refs/head/develop didnt match with the git show-ref results.
echo XXXXXXX(SHA ID) > .git/refs/head/develop
solved the issue.
I have resolved the issue as follow
Problem:
git checkout develop
Error: pathspec 'develop' did not match any file(s) known to git
(Develop is branch name)
Solution:
git show-ref
This will show the SHA ID of all the branchs including develop
cat .git/refs/head/develop
In my case the SHA ID in refs/head/develop didnt match with the git show-ref results.
echo XXXXXXX(SHA ID) > .git/refs/head/develop
solved the issue.