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

WordPress

Alex Flores
Alex Flores
7,864 Points

How does Wordpress Database work?

Hello all,

I feel like I should know this, but I don't. I'm using WordPress and Git. I made some changes to my theme and then I tried to git commit, but git said there weren't any changes made. So then I thought, well the changes must have been stored on the database. Is this true? And if so, why are html/css/javascript/php changes being stored on the database and not the actual files?

I feel like I'm missing something big here.

Thanks!

2 Answers

Sue Dough
Sue Dough
35,800 Points

The database is irrelevant to what’s going on. Brent is correct. You need to add your files before committing.

I usually do this:

git status

This will show me whats been changed if anything

Then I run

git add -A

which will add all the files. You can do 1 file at a time like Brett mentioned but thats a pain in the ass on bigger projects.

Then once your done just

git commit -m "my first commit"

Brett Smith
Brett Smith
4,261 Points

Are you tracking those files?

git add filename