OMG. I pushed a bunch of changes to GIT, then Godot said project on disk was newer. I OK’d it, then all hell broke loose. Now the Project Manager doesn’t recognize the project. I tried re-importing it (“Valid project found at path”) but now it’s a Missing Project with a red icon, a warning icon, and “? Missing Date”.
Thanks. I think once I’m over my initial panic I’ll pull that last big commit and see if it’s broken, but I have a nagging feeling it is. It was a big one for longwinded reasons, but I’d obviously rather not lose that much work.
I tried re-importing it (“Valid project found at path”) but now it’s a Missing Project with a red icon, a warning icon, and “? Missing Date”. I assume that means the project.godot file is bad (not just a corrupt scene for instance) but I don’t know much about it.
Back up your project by copying the entire project folder somewhere else.
Delete the .godot directory.
Re-open your project.
Everything in that folder should be recreated and hopefully you will be in a better state.
If that fails, you are in luck. Git works on a distributed model. That means that you have a full git repository on your disk. Your last commit before you pushed it is still there. You will have to use the git command line tools. Here’s an article explaining how to do that.
You’re going to need to use git log to identify your commit before you pushed, and then revert back to that. I cannot stress enough that you back up your local code (and therefore git repo) somewhere else before you try any of this. If you mess up with the revert, you’ll want to be able to try again.
Appreciate that, but I can’t open my project because the Project Manager says it’s missing. Reverting makes sense, but I’m going to lose more work than usual with this one, so I was hoping it was easier to un-mangle something more related to the “? Missing Date” message.
You will lose nothing by reverting. You said this happened when you pushed. That means you had already committed everything. It’ll put you back where you were right before initiated the push.
So, there’s a twist to this tale. I only suspected things got corrupted before/during the commit I pushed, but I’ve confirmed it. So, I’d actually have to pull an old one.
A few lines were inserted—sometimes more than once—throughout .gd, .tscn, and .godot files (that I’ve found so far) and they break things in various ways depending where they ended up.
The lines are:
<<<<<<< HEAD
=======
>>>>>>> origin/main
I’ve also noticed in some scenes with these insertions, that nearby lines might be duplicated but with two different UIDs specified, so that’s fun. (ext resource type=“Texture2D” uid=“uid://b81wgefvx4k21” <…> type of thing)
I cobbled together a project.godot file after comparing a fresh one to the broken one, and a prior one. It allowed me to open the project, and that’s how I started noticing the corruption. If anyone recognizes those lines, maybe they can help prevent this in the future.
So, I backed up the broken project, and I’ve been attempting to pull those lines out of everything manually to see how unbroken I can make things.
Ok, so that’s called a merge conflict, and takes some work, but isn’t the end of the world. It also happened after your commit. You did a push, and that’s when it happened. Here’s an article on resolving merge conflicts. You can also roll back your commit like I said before. The choice is yours.
What kind of conflict would have sprinkled HEADs all over miscellaneous files (esp without my merge permission)? And, if I was pushing when it did, why would all my local files be corrupt?
Any chance the Upgrade UID tool did me dirty here? I converted from 4.4 Dev7 and used the tool as part of this commit.
I just finished combing through and removing all the weirdness (it was less of a pain than redoing all the work), crossed all my fingers, and played straight through successfully
The default editor themes and syntax coloring was all messed up too. Pink strings. Yuk.