Unreal crashes when trying to run my game, and now everything is failing

After I added the “ActorThatOpens” line following the video lecture, i compiled the game and it successfully built, but when i tried running the game it just crashed Unreal. Tried several times with the same result. So i went to SourceTree assuming that I can revert my changes to a previous commit so all of my files are back before I made the changes, i didn’t really understand what to choose so i just right clicked on a previous commit and clicked “merge”, but that didn’t really SEEM to do anything, so then i did all kinds of stuff like Reverse Commit, Checkout, and now it seems that Unreal is no longer able to open my project.

I clearly did something wrong with SourceTree, so how in the world do i “go back to a previous commit state”? Is there a way for me to fix any of this…?

well, i just tried double clicking my previous commit, that seemed to work and i saw that in another thread the crashing is the result of not setting my TriggerVolume correctly and upon inspection it seems like my duplicated door did not have this set, so what a relief now it works.

Now my question is what is this whole “Checkout”, “Merge”, “Reverse Commits” used for…?

Checkout - Used to switch branch or restore files (e.g. discard your uncommited changes)
This command is rather confusing to beginners and which is why in August two new commands have been made switch and restore

Merge is used to merge branches together

Revert commits (I’m assuming you meant) is to undo the changes of a previous commit and create a new commit from that. e.g.

Add A functionality
Add B functionality
Revert B

This command doesn’t apply them in a range unless told to do so. i.e.

Add A functionality
Add B functionality
Revert A

Reverting here wouldn’t revert the changes made in B, only A.


A nuclear option is reset --hard this will mean you lose all future commits to the one you are resetting to so use with caution. Also not great when working with people as it would mean your git histories are different.

For more detailed explainations consider taking our Git Smart course.

Privacy & Terms