I executed the command git checkout -f branchName on my terminal. That made all of the changes to files I have been working on for four days go away, as I have overwritten them.
The worst part is that I didn't save my files anywhere, nor did I commit previous changes. Is there any way out from this situation? Can I restore my lost files and changes?
I have no idea why you didn't
pushyour changes, but you can try this solution. I also recommend using Sourcetree to manage your repo.The last resort might be trying a file recovery program like Recuva.