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 trialRobert Borsey
Courses Plus Student 9,636 Pointsgit course question
Hi everyone, I'm doing the intro for github so my question is when you have two or more files that you want to commit why is it that you do this with commit -m instead of using commit -a or -am or -a -m or something like that.
-m meaning (message) right ? -a meaning (all) right ? can someone tell me why this is that way or maybe I have missed something.
Thanks in advance
5 Answers
Kevin Niedermayr
3,072 PointsHey Robert,
if you check "git commit -help" it says:
-a, --all commit all changed files
that means you're right with your assumption. So you just want to push your changed files, which are affected when you hit "git status" and if you add a message via -m you will also push only the changed files (like you would do with -a) so it's not really necessary.
Robert Borsey
Courses Plus Student 9,636 PointsOk that was helpful thank you for answering
Kevin Niedermayr
3,072 PointsYou're welcome!
Robert Borsey
Courses Plus Student 9,636 Pointsdo you think you can help with my oter git post I posted here is the link
https://teamtreehouse.com/forum/git-intro-question-please-help
If you can help that would be great
Thank you again
Kevin Niedermayr
3,072 PointsMaybe, do you have a Link to that video/objective? If I can help you I'll answer it in the other thread and otherwise I'll comment or post here to let you know.
Robert Borsey
Courses Plus Student 9,636 PointsHere's the link http://teamtreehouse.com/library/using-gitflow
thanlks for helping