To see how the process of recovering deleted files works, begin by deleting the text file that you created earlier in the tutorial. Note how the GitHub desktop application detects that the file has been deleted:
To recover your deleted file, right click on the file in GitHub and select discard changes.
The file will now be back in the folder where you originally saved it.