Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Branch does not exist

the command

git branch --set-upstream-to develop origin/develop

results in the error

fatal: branch 'origin/develop' does not exist

I am not sure what this means other than origin develop does not exist. Does that mean it doesn't exist on the server or on my local machine?

I am a git newbie but I am in the process of setting up my site to handle deployments with git as a means to learn git.

like image 757
Chris Avatar asked May 12 '13 00:05

Chris


2 Answers

First make sure you are at develop branch. Then just use git branch --set-upstream-to origin/develop

like image 99
erkanyildiz Avatar answered Oct 30 '22 23:10

erkanyildiz


Git defines git branch --set-upstream-to <upstream> [<branchname>].

Here <upstream> specifies the remote branch and [<branchname>] is the local branch name and if you no branch is specified, it defaults to the current branch.

So, it should be git branch --set-upstream-to origin/develop develop

-u is interchangeable with --set-upstream-to

like image 42
Song WANG Avatar answered Oct 30 '22 22:10

Song WANG