git restore a deleted file after merge

前端 未结 1 1404
星月不相逢
星月不相逢 2021-02-09 00:18

I am trying to recover a file that was accidentally removed when I merged a branch to the master.

Now, when I try to do a git checkout of a new branch I get this messa

相关标签:
1条回答
  • 2021-02-09 00:53

    You can do, for instance:

    git checkout HEAD -- module/FormDependencies/src/FormDependencies/Entity/LanguageList.php
    

    This will checkout the file as it exists in the HEAD refspec (ie, the current branch). If HEAD is not what you want, replace with the appropriate refspec.

    0 讨论(0)
提交回复
热议问题