I’m using Sourcetree.
I was trying to merge 2 branches, but the result was completely broken, so I tried to undo it, but “Discard” didn’t work, so I chose “Remove” on all these files (800+ files). Which seemed to work as afterwards Sourcetree said there were no changes.
But then after switching to a different branch, I notice that all those files are now completely missing in other branches and in every commit, as if this remove-option completely removed those files from the entire history of the project.
Please tell me there is a way to undo this?
To clarify, I didn’t commit anything (there was nothing to commit), so there is no commit to revert from. According to sourcetree, it’s like nothing happened and those files never existed.
I tried googling for it but nobody seems to have ever had this issue?
This post seemed to have done the same as me, but for some reason his files werent deleted from the history of the project: Sourcetree – undo removed file
So that doesn’t help me one bit.
Steven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.