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 trialAndrei Punei
14,051 PointsCan you commit an entire folder to the repository? whitout specifing any subfolders or files!
Can you commit an entire folder to the repository? whitout specifing any subfolders or files!
1 Answer
Kevin D
8,646 PointsNot entirely sure on whether it would work like this, but try something like:
git add folderName
git commit -m "message"
If that doesn't work, you should be able to do it with this command: git add .
The full stop [ . ] adds all the new files you have placed in the folder (so it should include the whole folder). Once you've done this, you can commit it and it should commit the entire folder you just added.
This probably isn't the best method if you're adding more than one folder at once, as that commit message will be associated with everything you've just added instead of one specific one.