Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Git Basics Workflows A Day in the Life of a Git Project

are branches intended to be temporary?

It didn't dawn on me until the Workflow unit, that (and I'm not certain) seemingly branches are meant to be temporary. What if I want a copy of my project that is permanent, but not production, like for debugging? Is this a clone rather than a branch? I suppose the clone would be necessary as the project grows in size, is that correct?

1 Answer

Hi Mark,

I think they probably are designed to be temporary, as you would normally want to merge the changes back to the master branch at some point. But you can have branches that are permanent/semi-permanent - for example, if you are hosting your site using github pages, you might use a branch called gh-pages that exists for the lifetime of the project.

The problem with cloning is that there is no longer a link between the clone and the original repo. For example, if you cloned a repo and made a few changes, then updated the original repo. You can't see the updates to the original repo on the clone. You would have to clone the whole thing again (and overwrite your changes).

If you want to maintain a link with the original, use a fork instead.

See difference between forking and cloning a repo

Hope this helps :)

yes it does, thank you!