1

I created a new local branch using the Git GUI. I committed to it. I want to push it so its backed-up.

I just did a git push thinking it'd know what to do. Thinking it would push my branch up and make one on the server.

This Q/A seems to say it should:

How do you create a remote Git branch?

However, I get this error.

! [remote rejected] MyBranchName -> MyBranchName (no such ref)

error: failed to push some refs to 'http_link_not_allowed_by_SO'

Any ideas?

Community
  • 1
  • 1
Luke Puplett
  • 42,091
  • 47
  • 181
  • 266

1 Answers1

1

It seems the remote repo got corruptified. That's a word. On the server, in refs/heads/ was a folder for the branch, which made it appear that it had gotten so far to pushing and died.

So I renamed it and pushed again and it was fine.

Update

It actually seems that the problem recurs again. It's like I can only push a branch once.

Luke Puplett
  • 42,091
  • 47
  • 181
  • 266