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

Development Tools Git Basics Working With Remote Repositories Cloning

Floyd Orr
Floyd Orr
11,723 Points

When working on a project my own or another when should i be branching?

I'm not sure I understand when I should branch. If I have my commits and it's all saved and referenced why would I want to add branching just have one more thing to keep track of?

2 Answers

Charles Smith
Charles Smith
7,575 Points

This will vary depending on your environment. Some places will have specific expectations for when to branch. The way I do it for my projects (thus far, reasonably small) is to have master be the production branch, and then any time i work on bug fixes or a new feature, I branch. This way I know that master is always the current, working code, and if I get the itch to stop working on feature X and work on feature Y instead, it's very easy to switch branches.