I deleted some uncommitted class and ı committed all files and pushed. I don't know how can I fix that problem. Please help me. My important classes are lost. I tried some git command but I didn't fix. I used ;
- git stash
- git hard
I deleted some uncommitted class and ı committed all files and pushed. I don't know how can I fix that problem. Please help me. My important classes are lost. I tried some git command but I didn't fix. I used ;
Unfortunately, this is not a situation Git can help you with. If the file you deleted had not ever been committed, then by definition Git doesn't know anything about it, and can't help you recover it.
To avoid this situation in the future, I recommend you Commit Early, Commit Often. You can always squash commits together later if you want a cleaner history, but creating WIP commits allows you to roll back easily if you make a mistake.
If you have accidentally deleted a file that had been committed, then you can restore it as described in Find and restore a deleted file in a Git repository.