您的当前位置:首页正文

git 恢复到上次提交的状态

2024-11-11 来源:个人技术集锦

/e/GitWorkS (opt)
$>a.txt

/e/GitWorkS (opt)
$ git add a.txt

/e/GitWorkS (opt)
$ git ss
On branch opt
Changes to be committed:
(use “git reset HEAD …” to unstage)
modified: a.txt
Untracked files:
(use “git add …” to include in what will be committed)
.gitignore

$ git cm -m “>a.txt” 提交数据
[opt 5b31abf] >a.txt
1 file changed, 2 deletions(-)
提交之后发现,数据清空,要恢复,

显示全文