Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "cannot be resolved to branch" on git push?

Tags:

When I do a git status, I get my branch:

$ git status On branch OfflineLoading 

When I tried to git push, I get:

$ git push origin OfflineLoading fatal: OfflineLoading cannot be resolved to branch. 

When I check the branches, it is not there:

$ git branch    branch1    branch2    branch3    branch4 

How do I fix this?

like image 549
Matt Kuhns Avatar asked Jul 22 '16 18:07

Matt Kuhns


1 Answers

The common issue is case mistake. I got the same issue before. The better way to do it is to check what are the branch names:

$ git branch   master  *branch1   Branch2 

you can compare the branch on above, then push it with the name you got.

$ git push origin Branch2 

or

$ git push origin branch1 
like image 85
Kyle Avatar answered Sep 20 '22 21:09

Kyle