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 trialTrace Harris
Python Web Development Techdegree Graduate 22,065 PointsQuestion about Git and how repositories recognize files and such
So say I have a folder for my project named project and within that folder I have my index.html and three other folders titled CSS, Image, and JS. My question is do I need .git files in all of these folders or does a single .git file in the main folder handle ALL the contents of the folder when I initialize a repository? and if I do need GIT to install .git files into multiple files how would I initiate that when I create a repository for the project? Thanks
1 Answer
Sue Dough
35,800 PointsFirst question - You only need it in your root folder. You do not need .git in any of those 3 other folders you mentioned.
Second question - You need GIT to use git :) Just type in
git init
to initialize the .git folder in ../project/
Trace Harris
Python Web Development Techdegree Graduate 22,065 PointsTrace Harris
Python Web Development Techdegree Graduate 22,065 PointsAwesome Sauce! Thanks so much, now to version control my projects, Thanks! Awesome gif by the way!