How to fix "cannot resolve branch" on git push?

When I do git status , I get my branch:

 $ git status On branch OfflineLoading 

When I tried git push , I get:

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

When I check the branches, it is not:

 $ git branch branch1 branch2 branch3 branch4 

How to fix it?

+8
git github
source share
1 answer

A common problem is a case error. I used to have the same problem. The best way to do this is to check which branch names:

 $ git branch master *branch1 Branch2 

you can compare the branch at the top and then click on it with the name you got.

 $ git push origin Branch2 

or

 $ git push origin branch1 
+8
source share

All Articles