The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sourcetree undoes all the changes I've made

Emre Can
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 25, 2023

Hello everyone. 

I made a lot of changes in unity. I closed Unity and VS. Then I switched to source tree. I pressed the stage them all. Then I decided to discard a few things. When I discarded the unnecessary things, it also discarded the things I did not choose. And now it has shattered the project. I did it from morning to night and never pushed. For example, my scene disappeared while some codes were standing still, and in some codes, I put a lot of effort into it. Any chance I can fix this?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Martin Runge
Community Champion
September 1, 2026

Hi @Emre Can

I would run git fsck --lost-found in the repo folder. You staged the files first, so Git recorded them as objects, and they remain as dangling blobs.

Recovered files land in .git/lost-found/other with hash names and no extension. Open them in a text editor to find your scripts.

Also worth a quick git stash list, in case Sourcetree stashed rather than discarded.

Cheer, Martin

TAGS
AUG Leaders

Atlassian Community Events