OrganizedFellow Posted May 14, 2014 Posted May 14, 2014 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?
Craig Posted May 14, 2014 Posted May 14, 2014 Check the .gitignore file in the root of your project, because the default ProcessWire one includes "site" - so everything in there is ignored. 3
netcarver Posted May 14, 2014 Posted May 14, 2014 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. 1
OrganizedFellow Posted May 14, 2014 Author Posted May 14, 2014 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? 1
Recommended Posts