Jump to content
OrganizedFellow

nothing to commit, working directory clean

Recommended Posts

For the past few occasions, I'm working on some files.

Make my changes. Save. Before I commit or leave a message, I check git status

It's been telling me that there is nothing to commit, working directory is clean.

LIAR LIAR, GIT YOU ARE A LIAR!

Why is git not tracking my changes?

I noticed this even on a totally new project.

:(

I'm afraid I have broken my git. How did I do that? Is that even possible?

Share this post


Link to post
Share on other sites

Check the .gitignore file in the root of your project, because the default ProcessWire one includes "site" - so everything in there is ignored.

  • Like 3

Share this post


Link to post
Share on other sites

I've never known git lie to me. I've known me mess things up and not realise it for a while. I think Craig has probably identified the culprit in his answer but failing that another possible mess up would be working out of a directory you think is symlinked from your git repo but isn't (been there, done that.) If that's the case you still have all your changed code - just diff them with the files in git and pull over the changes and commit.

  • Like 1

Share this post


Link to post
Share on other sites

Check the .gitignore file in the root of your project, because the default ProcessWire one includes "site" - so everything in there is ignored.

YEAH BUDDY, that's the problem. I can't beleive it's ALWAYS something so simple. lol.

So just to test it, I deleted the contents of .gitignore and ran git status

Just as I thought, it shows everything properly. (I'm still a git newb.)

So now that THAT'S working, what paths should I ignore? 

i'm sure the /cache/ folders. What else?

  • Like 1

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...