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 trialSage Elliott
30,003 PointsWordPress Version Control
Hello, I'm curious read how some people use version control while developing a WordPress Site. If you're using Git and Github what does your .gitignore file look like? I'd imagine there is some info you'd like to keep hidden.
*I haven't gone through all of the courses yet so they may get to this subject
2 Answers
Kevin Korte
28,149 PointsI would init the git repo at the root of the of the theme or plugin I was working on. I would not version control the wordpress core files.
If I was developing a theme and a plugin together, I would probably run those as two separate git repos.
And I would certainly add the wp-config file to the .gitignore file, and any other file(s) that would contain sensitive info like api keys, passwords, etc. If you need this type of information available across the site, environment variables are a great way to do that.
Sage Elliott
30,003 PointsThanks Kevin Korte ! That makes a lot of sense.