Git restore deleted files

After going through the git rm test.txt file, it is very simple to restore the file. After performing the first step, it is impossible to restore it directly, because it is only deleted in the temporary storage area, and it must be committed before it can be restored. After executing commit, execute git log to view the version serial number

 


 


 Then according to the serial number, copy to the serial number, execute

 

git checkout e549269cca3627a8ac0a71c26fb43f0ecd0ab88e test.txt is enough.

 


 

 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326081691&siteId=291194637