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 trialJake Nisenboim
3,374 PointsGit Commit
The question is asking me to commit the file.
I tried both 'git commit index.html' 'git commit -a' 'git commit index.html -m "Changes"'
I am unsure why it is telling me it is the wrong command ?
EDIT: The answer is simply 'git commit -m "Message"'
Why is that the case that I need not specify the file?
1 Answer
Cena Mayo
55,236 PointsHi Jake,
When you 'git add' a file, Git starts tracking it, so it knows when a file/files have been changed. 'Git commit' basically says: look at the files being tracked, and commit the ones that've changed since the last commit.
There's a really good free book on Git that discusses this in more detail.
Best, Cena
Jake Nisenboim
3,374 PointsJake Nisenboim
3,374 PointsAwesome, thank you !