Day 3: Branches

A really important part of remote collaboration is the concept of branching. I like to think about it like…well… a TREE! The master branch is the trunk. This is the branch that will eventually be used to release the project to the public. A common practice is to have a branch named dev that sorta of acts like the master branch, and several other branches that you merge into that branch. Lets take a look at what I mean.

Here you can see a list of branches currently available in the project by typing out git branch.

We only have master. I’m going to create a few branches now by typing git branch and then a name for the branch. So in this instance git branch dev.

Type out git branch and press enter. Now you can see a list of branches master and dev. I am still in master. It has an * next to it. To go into my dev branch, I just need to type out git checkout dev. Now I’m in dev.

For the sake of this article I have created several branches. I want to explain how to make changes to these branches and eventually have those changes exist inside of the master branch.

Here is a short video explaining how to accomplish this.

https://youtu.be/Ga1Oe7QlFsQ

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gerald Clark

Gerald Clark

Father Game Developer Music Composer Sound Designer