My co-developer made a lot of changes on his remote gitlab repository: merged, deleted, created new branches etc.
Now I need to work on a new feature branch that he's just created. I open my Gitbash, do:
git pull git@gitlab.example.com:root/project-name.git
git checkout new-feature
I get error: pathspec 'new-feature' didn't match any file(s) known to git.
Then I tried:
git show-ref
This only shows two branches, while it should show at least 8. I also tried fetch which made no difference whatsoever.
Are the files really missing or is it simply not tracking the new branches?
How do I get the new branch to my local workspace?
Would git clone
solve it or only make it worse? Thanks.
UPDATE: Thank you for your help, unfortunately, neither of the suggestions worked and I had to delete everything, set it up from scratch and do a fresh git clone. We looked through the error logs but didn't find any clues. Just one of those things, I guess.