Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is difference of "develop" and "origin/develop" in command git [duplicate]

Tags:

git

command

push

I'm newbie and starting use git for project. I not notice the difference of "Branch" and "origin/Branch" Please guide me. Picture of the challenge that I've faced

like image 323
Morteza M Avatar asked Jun 07 '17 08:06

Morteza M


People also ask

What is origin develop in git?

In Git, "origin" is a shorthand name for the remote repository that a project was originally cloned from. More precisely, it is used instead of that original repository's URL - and thereby makes referencing much easier.

Should I create branch from master or develop?

You shouldn't commit anything directly to the master branch. Instead do all your work on the develop branch and then merge develop into master whenever you have a new public release. That's the same way you create a branch but without the -b .

What is the difference between master and origin master in git?

Master: This is a branch name where we first initiate git and then we use to make commits. And the changes in the master can pull/push into a remote. origin/master: This is a remote branch, which has a local branch named master on a remote named origin.

Is Origin always master in git?

The term "git origin master" is used in the context of a remote repository. It is used to deal with the remote repository. The term origin comes from where repository original situated and master stands for the main branch. Let's understand both of these terms in detail.


1 Answers

Branch is your local branch and origin/Branch is your remote branch.

To make sure which branches are local or remote just use the following git commands.

$ git branch     # see local branches
$ git branch -r  # see remote branches
$ git branch -a  # see local and remote branches
like image 51
Sajib Khan Avatar answered Oct 19 '22 23:10

Sajib Khan