Pushing to github from unity went wrong

842 Views Asked by At

EDIT: Found out that the models are indeed still there but the code changes that were done yesterday are also gone.

I was working on my unity project that I started few weeks ago. As I do everyday after I finish my work I upload everthing new to github in case of anything. Yesterday on the other hand, My unity project had it's terrain object as a 120mb file. Git doesn't push files that are 100mb or higher. The problem is I did commit my changes like 5 times while trying to figure out if I can push it anyway as I thought that git lfs will help me but as far as I understood It helps only with 50mb-100mb files. 100mb + are just blocked from pushing. I tried with both git desktop and git dash. Now I wanted to delete those commits , delete my terrain asset as It was only a terrain with a green layer and 2-3 road paths drawn on it. It could've been easily replaced and redone. The 120mb was from being a 4k texture map , heightmap and everything else it's settings had were changed by me to 4k for quality. Anyway, comming back to my problem, I used git dash to delete those last 5 commits. I just installed git dash so I knew nothing about the commands. As stupid as it was from me to not do a back-up before playing with the commands, I thought I can come back to the git previous pushes and that is all. So i used the command "git reset Head~5" and it indeed deleted my 5 commits that I had there, I deleted my terrain and pushed the project onwards. This morning when I opened my project , my scene is empty. My assets are still there, all prefabs and things but my scene is Empty, no player, no light,no scene items I had in,nothing. What I want to do is to come back to the previous push , as I have had some things on the scene that could be redone but that in 2-3 days of 12 hours+ work maybe. And getting the last push wouldn't be such a problem as Yesterday I mostly imported 3dmodels which as I said were not deleted or something.

Overall : How do I pull the 2nd from last push?

0

There are 0 best solutions below