I accidentally switched from my remote dev branch to local dev and now I cannot switch back.
When I try to:
git fetch origin/master
I get
fatal: 'origin/master' does not appear to be a git repository. fatal: Could not read from remote repository.
I also tried:
git checkout origin/master
And I got:
error: pathspec 'origin' did not match any file(s) known to git. error: pathspec 'master' did not match any file(s) known to git.
I checked with git remote -v that the url for my origin was there. Also in config file the right url is indicated
remote.dev.url=https://'my_origin_url'.git
remote.dev.fetch=+refs/heads/*:refs/remotes/dev/*
remote.dev.pushurl=https://'my_origin_url.git
branch.dev.remote=dev
branch.dev.merge=refs/heads/dev
remote.origin.url=https://'my_origin_url'.git/
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
And I tried:
git reset --hard origin/master
The result was:
fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
How can I go back to my origin branch?