Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![akhil maddu](https://secure.gravatar.com/avatar/0ac56d85020c72469f7f6a89f670c616?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
akhil maddu
1,422 PointsWhat is branch in git? and what are its uses?
a
2 Answers
![Jason Jones](https://secure.gravatar.com/avatar/92e420cfcaf5cc990f3425c73b46ec13?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jason Jones
18,663 PointsBasically, you have your master branch and you don't want to mess anything up on that branch. However, you need to implement a new feature that works with the codebase on the master branch. A branch will allow to make a "copy" while not affecting the original branch (master in this case).
So, to get around this problem you can a branch (We'll call it 'new_feature') that is a copy of the master branch and add your new feature code the the new_feature branch. Once you have finished implementing the new feature you merge the new_feature branch with master and BOOM, done.
I will include a link to the gitflow workflow. This really helped me understand branching and why you should use it.
![Nicholas Arcuri](https://secure.gravatar.com/avatar/7e40a066a8513d8c66eb5450d874caab?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nicholas Arcuri
11,311 PointsThink of it like a tree.. The master is the trunk, of which you can branch off from. You start a new branch off of the original master so that you can make changes to the project without affecting the original master branch. Whoever else is working on the project can continue with the master branch as well. Then, when you finish your changes you can merge back with the master branch and your changes will be present, along with whatever else was changed in the meantime.