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 trial

JavaScript

How to add multiple files in git

Hello

I'm stuck on a code challenge.

We have multiple files in our directory that we want to track. Add them all with one command. I'm sure the correct answer is git add.README.md.

I receive, Bummer! remember that we must add a README file

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Hey Jason,

You'll need to link to the challenge for us to be able to help troubleshoot. Use the "Get Help" button from the actual challenge, or if it's still not working yet, paste the link to the challenge here in a comment. :dizzy:

1 Answer

Hey Jason,

It looks like you're currently trying git add . README.md. However, there's no need to provide a file name in this case.

You can just use git add . to track multiple files in one command. There are also a few other variants, such as git add -A but I believe this should work for your challenge.