..." to unstage) deleted: Application/Home/View/Index/Index.htmlApplication/Home/View/Index/Index.html 记住这个工作区告...">
当前位置:   article > 正文

git找回本地误删的文件

git找回本地误删的文件

$ git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
        deleted:    Application/Home/View/Index/Index.html
Application/Home/View/Index/Index.html 记住这个
工作区告诉我,你把这个文件删除了,那么接下来是这样的

一,执行命令:

$ git reset HEAD Application/Home/View/Index/Index.html(注释:上面的那个路径)
Unstaged changes after reset:
D       Application/Home/View/Index/Index.html

二,执行:

git checkout  Application/Home/View/Index/Index.html

好啦,你误删的文件回来了

转载:git找回本地误删的文件 - 支照 - 博客园

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/659482
推荐阅读
相关标签
  

闽ICP备14008679号