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!
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
Matthew Fili
2,115 PointsVersion Control - Why don't you need to specify a filename when committing?
At the end of the Committing Changes module we committed a second piece of our README file.
$ git commit -a -m “Added some stuff”
I was curious why we wouldn’t need to specify that you’re referring to the README file?
e.g.,
$ git commit README -a -m “Added some stuff”
2 Answers

Ryan Field
Courses Plus Student 21,241 PointsSomeone can correct me if I'm wrong, but the flag -a
here, I believe, stands for all
, meaning it will commit all files that are in the staging area.

Kevin Korte
28,147 PointsBecause technically you are passing in the -a
flag in your commit. This means you are telling git to automatically stage all files that have been modified or deleted, but new files that Git doesn't know about will not be affected.