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 The Staging Area

So do we add files like website files we've been working on to Git so people can see what we're working on?

For example if I created a website with some .css and html do I add those files to a Git repository so others can see them? Is that the whole point? Just slightly unclear about the whole thing.

2 Answers

Pieter-Jan Smets
Pieter-Jan Smets
4,675 Points

To add on what Kevin said, the whole point is to track your project's history. That's why it's called a Version Control System. When you're just by yourself, the whole point of using it might not be as apparent, but when working together with other people it's proven to be a very useful tool.

That's because when people work together on a project, they might change things in the same file and so on. If you can track your history, it's easier to see what exactly changed. Git also provides tools to merge those changes together, to make it extra easy.

You don't benefit as much from this when you're working by yourself, but there's one good thing about using git anyway. If you find out you've been doing things the wrong way and you want to start over from a specific point in time, you can tell git to restore your files to look exactly like one of the commits in your project's history. That way you can just throw away all the work you did and start over. This way you don't have to delete all the code you don't want by hand, which could take a lot of time.

On top of that, if you use a service like Github, git is also an easy way to make a backup of your project.

I hope this was somewhat helpful :)

Kevin VanderWulp
Kevin VanderWulp
5,180 Points

GitHub is a place to share your source-code, plus a place to control your source code. Git is what is called version control software. It allows you to control changes to your code, especially when working with a team. People will not be able to veiw your webpages as a regular webpage with styling, however. They will only be able to see the source code that will be translated by a browser as a webpage if it was being hosted on a webhosting server such as godaddy.com.