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 trialYan Guo
646 PointsGit -- Merge Challenge
I am confused for the answer about this question - Let's say that you've been working on a branch called rewrite_main_page, and you've just finished the last change you needed. First, commit your work.
I ran the commands: git commit -a git commit git commit -a -m "blablabla"
But none of them works.... Any clues?
Thanks!
2 Answers
riannonriannon
12,161 Pointsanswer is;
git commit -a -m "any comments"
Because there is -a flag, no need to type any document name. -a flag stands for "all"
emiliakubokirschenbaum
8,816 PointsHave you added your work first? Before you run a git commit, you have to run git add. This stages your changes for committing.
Yan Guo
646 PointsHi Emilia,
This is the first task I started and I didn't run git add. Does it matter?
Yan Guo
646 PointsI finally got the write answer:
git commit -a -m "any comments"