Can’t push to remote branch, cannot be resolved to branch

I migrated my repos from Bitbucket or Github. I don’t think this matters but it’s the only thing different. For a little while, I had two remotes set up: origin: bitbucket github: github Then I removed both and pointed origin to github: git remote remove origin git remote remove github git remote add origin https://github…. … Read more

Git checkout: updating paths is incompatible with switching branches

My problem is related to Fatal Git error when switching branch. I try to fetch a remote branch with the command git checkout -b local-name origin/remote-name but I get this error message: fatal: git checkout: updating paths is incompatible with switching branches. Did you intend to checkout ‘origin/remote-name’ which can not be resolved as commit? … Read more

How do you remove an invalid remote branch reference from Git?

In my current repo I have the following output: $ git branch -a * master remotes/origin/master remotes/public/master I want to delete remotes/public/master from the branch list: $ git branch -d remotes/public/master error: branch ‘remotes/public/master’ not found. Also, the output of git remote is strange, since it does not list public: $ git remote show origin … Read more