Viewing a Deleted File in Git

后端 未结 3 1816
盖世英雄少女心
盖世英雄少女心 2021-01-30 02:04

I\'ve deleted a file with Git and then committed, so the file is no longer in my working copy. I want to look at the contents of that file, but not actually restore it. How can

3条回答
  •  -上瘾入骨i
    2021-01-30 02:38

    Since you might not recall the exact path, you can instead get the sha1 from git log then you can simply issue

     git cat-file -p 
    

提交回复
热议问题