所有已发布但未提交的文件在发布后都被删除:git reset --hard HEAD [英] All staged, but uncommitted, files deleted after issuing: git reset --hard HEAD

查看:242
本文介绍了所有已发布但未提交的文件在发布后都被删除:git reset --hard HEAD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常情况下,你可以这样做:

  $ echoStanley,你必须小心驱动器蜂>文件 -  
$回声什么是驱动器蜜蜂? > file-b
$ git init。
$ git add file -b
$ git commit file -b -m我们不知道,但是无论你使用什么错误都可能是致命的。
$ git reset --hard HEAD
$ ls
file -a file -b

我认为我做了一件非常糟糕的事:

  $ echo你在做什么,

Normally, you can do:

$ echo "Stanley, you must beware of the Drive bee" > file-a
$ echo "What's a Drive bee?" > file-b
$ git init .
$ git add file-b
$ git commit file-b -m "We don't know, but whatever error you make with it could be fatal."
$ git reset --hard HEAD
$ ls
file-a file-b

I think I did something really bad:

$ echo "What are you doing, you darn 
                        

这篇关于所有已发布但未提交的文件在发布后都被删除:git reset --hard HEAD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆