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 Getting Started With Git Looking Back on What We've Done

What is the master file & if I understand the master correctly, what happens if we change a historical file?

Tommy just started using the term master in Git without explaining what this is. I assume it's either the original file or the most recent file.... or is it something different?

If we have an older version open and change something, what happens to the master?

1 Answer

Sue Dough
Sue Dough
35,800 Points

He is referring to the master branch not master file. A branch can contain 1 file or 1 million files. When you create a git repo it will have 1 branch and that is called master.

You can make other branches with different names to work on a new feature or if you are collaborating with other developers. You can then merge those changes into the master branch once done. For example a website is live with users. The development team may want to make a lot of changes for the 2.0 update and they may work on a different branch called new-update for a few months with out touching master. Once they feel it is ready they will take the changes from new-update and merge them into master. Then they will update their website with the latest changes.

If you are on an older version ( older commit ) and change something then you will still be on master but you will be behind a few commits. Git won't let you update if your behind unless you git push force which is usually dangerous and should not be done unless you know what you are doing.