getting off on the right foot

db042190
db042190
Hi I'm going to add a GIT repo to our remote server and then clone it locally. I don't totally get branches yet but a production and test branch make sense to me. I'm looking at an example where those two branches were created but there is a third branch called master. Must I have that 3rd branch? What can/does it do for me?  I see this in a tutorial i'm following and it confuses me "By default, git clone automatically sets up a local master branch that tracks the remote master branch it was cloned from.".  And I just set up the remote repo and see that my production branch which I added first was "based" on master (which was already there) and I had a choice when setting up test so I picked based on "production" but didn't really know what or why I was choosing these things.

Last updated

db042190
db042190
I deleted my production branch. I'm keeping my Master branch as Release. From what I remember my Test branch is based on Master right now. From what I am reading, there is no need for 3 branches when all one wants to distinguish is Test from Release.
DougR
DougR
As you've learned, Git defaults to using a branch named "master". Most folks use that to contain their "Release" code.  There are lots of uses for branches and there's also a strong debate about not using them at all. To get an eyeful google "git branching models comparison".

1-3 of 3

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.