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 Introduction to Git First Commits Staging Changed Files

Hi, the teacher said we add things to the metal.html file then click in the console to activate it and I clicked down

<!DOCTYPE html> <html> <body> <p>We have a fine selection of medals.</p> <div> <a href="bronze.html">Bronze medals</a> </div> </body> </html>

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

I'm not entirely sure which bit of the video this is referring to but I think you're trying to enquire as to how to add changes to the "staging area" of Git. So that Git knows which changes to commit or "save".

Say that you're medals.html. You make and save some changes in the file. You then want to make sure you're in the directory for that file. You do that in the console.

Then type in "git status" in the console to make sure that the medals file shows up in the staging area as. That means it is ready to be added and commit.

Type in git add metals.html or git add . in the console.

Try git status again.

If the file shows up as green you have added your changes in git correctly.

I hope that has helped you add to your understanding for how to use Git in your coding. :)