So just before making the new scripts for triggering i saved my commit and went to change the name of my scripts. i messed it up and my game messed up so i just thought ez. Ill just reverse to what i saved before doing this like before with my terrain.
Is there any reason my [Organizing/Trigger] branch isnt the top one in my branch after hard reversing?? ive done this before but its not working now
so im looking at my game and it reversed everything like i expected besides the very thing i wanted to be reserved and that was the code. when i load up my game i have 2 different codes for how my ship is controlled yet there shouldnt be because when i saved it i hadent typed in anycode i was on the box collider part of the video. This is kind of embarassing because its probably the 3rd time ive had a problem tryig to use source tree but im 100% sure that when i go to my source tree and go to the [Reset current branch to this commit] and use HARD the [uncommited changes] dissapear and the one you reset it to shows up in sourcetree as your first branch
I think i didnt. so should i revert it to the one before that. The [obstacle/Enemy] branch. either my unity or script was open because now i have duplicates when i open unity
I did that but some of my things didnt change like the script and my ships prefab other than that everything changed and ik it was reserved because i called my cubes obstacles before reverting and they went back to cube. Should i try reverting to one farther back since maybe i messed up the latest one?
Before you do anything, make a backup of your project folder by duplicating it.
Then test one of your ealier commits. It might be that some of your changes had not been committed when you made a commit in the past. Or you thought you made a commit.
If you just want to discard uncommitted changes, go back to the uncommitted changes and click on the Discard button.
oh ok. Just to make double sure tho i duplicate my project folder name it like 4_Astral_assasin_duplicate. Then i make a Git of it on source tree to save it then on my main one i try reset all and in case of anything my duplicate with its own sourcetree is there correct?
Save the folder on an USB stick or wherever you want. Do not touch this folder. It is a backup.
Continue with your actual project, try what you wanted to try in SourceTree. IF the project breaks, you can delete this folder and duplicate the duplicated one.
And another thing is considering that doing reset all would remove my uncommited my changes it seems like the proposed branch i want to reset it to is messed up because i never closed the scripts or game when i did it So would an alternative be Resetting a current branch to my Obstacles an Enemies Commit?
Im sorry for the trouble im just really trying to understand/learn while making sure im doing the right thing.
If something breaks your project, restore the copy. “Reset All” just removes your uncommited changes. This should not break anything. However, in your first post you wrote that you wanted to use HARD, which is a bit dangerous as Ben mentioned in the video.
If your commit is messy, Git cannot magically tidy it up.
im just really trying to understand/learn while making sure im doing the right thing.
That’s absolutely fine. I asked you to make a backup of your project so you can test everything without the risk of losing your work. I’m not saying that you will break your project. I’m just saying: Better safe than sorry.