How to find and restore a deleted file in a Git repository

前端 未结 27 1050
挽巷
挽巷 2020-11-22 01:25

Say I\'m in a Git repository. I delete a file and commit that change. I continue working and make some more commits. Then, I find I need to restore that file.

I know

27条回答
  •  清酒与你
    2020-11-22 02:28

    I also have this problem using the below code to retrieve a previous file to a local directory:

    git checkout 
    

    The below example is working for me:

    git checkout resources/views/usaSchools.blade.php

提交回复
热议问题