Source Tree: Does Resetting My Commit Effect Unreal, Or Just C++?

Hey, I’m on Lecture 74 “Resting Your Unreal Project” and I was following along with Ben’s description of how to revert to a previous version of my Unreal Project
BUT the change I made in the editor to see if the reset worked (( which was enlarging a chair and hovering it above the map )) seems to still exist in my map, despite me “reverting” to a version of my project before I put the chair in.

Here’s what I did:

  1. Opened Source Tree and looked over all my past commits.

  2. I right clicked my most recent commit (( the one I saved before I put the super-sized chair in my map )) and I selected from the drop down menu “reset current branch to this commit”

  3. When it asked “Are you sure you want to move the branch pointer?” I selected in its Using Mode: “Mixed - Keep working copy but reset index” (( I guess that’s how you reset it anyway, could be wrong ))

  4. After it apparently reset to my previous commit I then followed along with Ben’s instructions of deleting the proper files in the Unreal Project folder: Saved, Intermediate, ect.

  5. I then went through with restarting Unreal and letting it rebuild its generated.h files.

  6. BUT when I got back into Unreal… that freakin’ super-sized chair I’d put in was still there! (( Please tell me if I’ve done something stupid here. Does “resetting” your Source Tree commits actually effect Unreal’s maps? OR does it just effect C++ code? Cause I’m kinda confused right now… ))

Anyway thanks for reading this.

I might be wrong, but I believe you’ll find doing a hard reset (not “mixed mode” as you went for) will achieve what you’re aiming for. A hard reset basically deletes current files and restores from the commit you are basing the reset of; whereas a mixed reset keeps your current changes (e.g. your oversized chair).

1 Like

Thanks for the answer, man.

Something i found out today but yet to confirm it is if you havent actually commited your changes you can just double click the last commit and it will give the option of reverting to that commit and ignoring the lcoal changes.
@wowsuchnamaste is right though mixed mode merges not overwrites so change it hard reset and dont keep local changes.

Hope this helps for future reference (Sourcetree the program we love and hate at the same time!)

Hey, thanks for sharing.
Yeah SourceTree can be confusing sometimes and I’m wondering if I should switch to PerForce instead, but until this course is done, or until me and my brother need to work on our project at the same time, I’ll stick with SourceTree.

Privacy & Terms