2

I am new to Git concepts and I have been having trouble in how to reference various branches. There are several post in SO like this one but still am unsuccessful in understanding. The attached image has the Git code flow diagram which I am trying to present to team to explain code movement. Can someone correct me if I have labeled the branches correctly. Does the concept of origin, origin master, origin/master etc come in to picture only when git commands are being applied between 2 sources? i.e between Remote-Remote or Remote-Local. In my case I have 2 Remotes and 1 local. Kindly suggest how to reference A , B and C in the image.

EDIT: I am using GitLab hence tagging to GitLab as well. enter image description here

bbaassssiiee
  • 6,013
  • 2
  • 42
  • 55
  • 1
    First of all: please be aware that case matters, so "Origin" and "origin" is not the same thing (or might be in some unfortunate cases), it's important to be precise when talking about names like that. – Joachim Sauer Nov 22 '19 at 12:27

1 Answers1

1

It is custom to name C: upstream. Maybe this diagram helps...

enter image description here

bbaassssiiee
  • 6,013
  • 2
  • 42
  • 55
  • Thanks for responding. When you say Upstream does it make sense to say that it is the final destination where code sits? or can Upstream be referred to mid layer as well when we talk relative to my local machine. – mrunalini pujar Nov 22 '19 at 12:27
  • Clones can reside anywhere, but my point was that your developer forks from a repo which we call upstream. The developers have write access to origin (to push a branch to origin), in upstream they can create a pull-request based on fork. – bbaassssiiee Nov 22 '19 at 12:33
  • I think I kind of got it. Developer forks from upstream. Developer clones to local machine. Developer codes. Developer then pushes local branch to origin(in this case origin refers to mid layer). Finally Developer sends merge request to upstream. – mrunalini pujar Nov 22 '19 at 12:39
  • Indeed that's it. – bbaassssiiee Nov 22 '19 at 12:41