Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use git to recover local mistakenly deleted files

Shulou Source: shulou.com Published: 2022-06-02 10:33:30 10月05日 Update

How to use git to recover local deleted files, I believe many inexperienced people are helpless about this, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Step 1: git status

View local staging records for changes. As shown below, I deleted the folder "../" by mistake. Server"。

Step 2: git reset HEAD

Step 3: git checkout [deleted file or folder]

Take the Server folder as an example, you need to execute:

git reset HEAD ../ Servergit checkout ../ Server After reading the above content, do you know how to use git to recover local files deleted by mistake? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!

Tags: Documents folders content methods more problems helpless for this successively reasons this skills articles experience industry information information channels channels memory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Huawei Apple Docker MySQL