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
When to use -a in commit?
When should I use -a in commit and when i should not use it?
In other words, what is the difference between:
git commit -a -m "comment"
git commit -m "comment"
Michael Hulet47,909 Points
-a flag tells git to commit all the changes it finds. It essentially allows you to skip ever running
Mathew Kurian4,698 Points
I had this same question also. So if you create 5 new files and then run "git commit", does it just add all the files?