I lost my repo

So I recently bought a SSD to help learning faster.
I thought sourcetree would save my data of the game, all to do is download UE4, VS again and build the game back. But when I open my sourcetree, there was nothing but the test repo I made on their website. Everything else I make on the app were gone, BuildingEscape and BullCowGame.
Does anyone know how to recover those files? It likes fond memories. I can create the whole thing back but I rather continue to make Battle Tank game.

I hope Ben would remaster this course to teach newbie how to use Sourcetree and GitHub before moving on to actual coding.

At least with Github you have to continually push changes to it (possibly sourcetree is the same). So you would have pushed your project to Github a final time if there were changes before switching out the storage drive but you should always properly backup a project either through Github and pushing the project to it everyday or local backups, etc.

The scope of the course is c++ with UE… not Github, or even project backups, etc. Though they did very briefly mention in one video at the very least to backup the project directory before making changes - but again that was like 2 seconds because its not really what the course is for. And they do go a bit further at 73 with a full video dealing with starting on it and then more spread out after that.

But, I don’t understand if you bought an ssd and just installed it then you should still have the other drive with your project on it unless you decided it was a good idea not to have a backup which is always a bad idea.

In any case, you should also learn to do automatic backups. Its no good doing programming / development if you lose 10 hours or 1,000 hours of work because you didn’t backup properly.

1 Like

Instead of making a new thread, adding this here (Windows)

You can get in-editor github push ability which is how I like things through this plugin here https://github.com/SRombauts/UE4GitPlugin/releases

  1. Find the release for the UE4 version you’re using and click the big text link eg for 4.19 its 2.7-beta. From there download the source code zip.

  2. Find and extract the source code zip.

  3. Cut or copy the sub folder eg UE4GitPlugin-2.7-beta.

  4. Go to UE4 project dir and create a Plugins sub dir.

  5. Paste into this Plugins dir.

  6. If you already have a .git and .gitignore, delete both of these (I couldn’t get it to work without doing this so you will be committing to everything to Github again - if that’s a problem then don’t continue).

  7. Start UE4 editor and open the project if not automatic.

  8. Next to save current button near top should be source control button. Use that and change source code settings.

  9. Select Git LFS 2.

  10. If you don’t have git installed, go and install that https://git-scm.com/downloads otherwise it should show git.exe and the full path to it and just continue to 11.

  11. Sign in to Github and create new repository.

  12. After create repository you will see a page with the url ending in .git. Copy that url and paste into the url field.

  13. Initialize (wide button near bottom).

  14. Check the box for file locking workflow to allow push to git.

  15. Accept settings and it should be connected. (I assume at this point that you have set git name and email. If not, you’ll need to figure that out. I already did so don’t know for this).

  16. Source control button and submit to source control to create a commit.

  17. Finally push and it should show up on Github.

From here on out you just create new commits and push all right from within UE4 :grinning:

And this would at least get you familiar with making commits and pushing without thinking of another application.

1 Like

I don’t know why I formatted my drive, lost everything on it just to install win 10 again. I should have just used some app to migrate OS. I just thought when committing to SourceTree, we would have a backup. But no, we have to connect with GitHub first. What a valuable lesson I learned.
And thank you for your recommendation. This looks great :smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms