1

My branch name is in capital, say, ABC. I misused it in the lower-case, abc.

git check out abc

Even under the lower-case brach (abc), it still worked with rebase. After rebase, I started to push the code,

git push origin ABC -f

Got the error,

fatal: the remote end hung up unexpectedly

Then I checked out the capital name branch, ABC. And still got the error when pushing it.

I found another post discussed it but no solution for my problem. Git: 'Master cannot be resolved to branch' after merge

Zhang
  • 3,030
  • 2
  • 14
  • 31

1 Answers1

0

I tried this out.

Delete the false brach, abc.

git branch -d abc

Push the correct one,

git push origin ABC -f

error: src refspec ABC does not match any.

Then checkout ABC again,

git checkout ABC

Then push it again,

git push origin ABC -f
Zhang
  • 3,030
  • 2
  • 14
  • 31