Article
记git reset --hard
平时不是所有的改动都提交,也保留一些临时代码。今天在主干上提交了后,需要reset后退到前几天的版本,但是直接checkout是新建一个分支,如果reset sort还需要处理index,麻烦,就在eclipse中点击了reset hard,我勒个去,直接把 原来提交过的代码 改动没提交的 给还原了!!!
First, it’s always worth noting that git reset --hard is a potentially dangerous command, since it throws away all your uncommitted changes. For safety, you should always check that the output of git status is clean (that is, empty) before using it.
–END
Related
Related posts
-
在树莓派 Ubuntu Server 上跑 OpenClaw Browser:Chromium 无头模式实战
2026-03-08
-
Linux brew安装过程
2026-02-01
-
本地端口转发:访问远程 Linux 本地服务
2026-02-01
-
Fabric:命令行管道中的 AI 工具,更具价值的是里面 230 个系统提示词
2026-01-08