linux不小心删除了html文件夹,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 ..." 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值