zoukankan      html  css  js  c++  java
  • git找回本地误删的文件

    不小心把本地的文件删除了一个?

    想从仓库git pull 下拉?

    对不起,这是不行的,虽然不知道为什么,但是我告诉你怎么回复这个文件。

    首先,我们先用git status 看看工作区的变化

    $ 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

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

  • 相关阅读:
    ByteBuffer使用实例
    Fiddler抓包显示请求时延
    手机wifi连上Fiddler后无网络问题解决
    git
    git
    Autofac使用
    Redis实战
    Redis实战
    Redis实战
    Redis实战
  • 原文地址:https://www.cnblogs.com/sidesky/p/9070822.html
Copyright © 2011-2022 走看看