Mistakenly created a new branch and git won't pull
We have 2 branches. One is live and the other is admin. We just moved to a paid github account and I was working on live.
After git push, when i type "git branch", only live shows up. I don't know why. Mistakenly, i typed "git branch admin" instead of "git checkout admin" and I think this created a clone of the live.
I can't access the admin branch anymore! What should I do?
If a branch admin already existed, then if you had typed
git branch admin
You should get the error:
fatal: A branch named 'admin' already exists.
This suggests that perhaps you never pulled the branch to your machine, or deleted it in some other way. Why not just pull the branch again from GitHub?
git fetch origin admin git checkout -b admin origin/admin