且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

git reset HEAD使用

更新时间:2022-10-05 08:19:17

修改demo1.txt文件

vim demo1.txt

修改hello.php

vim hello.php

查看文件状态

git status -s

添加到缓存区

git add .

查看文件状态

git status -s

将hello.php从缓存区清除

git reset HEAD -- hello.php

查看文件状态

git status -s

提交文件

git commit -m '修改demo1'

查看文件状态

git status -s

命令行输出

git reset HEAD使用



本文转自 素颜猪 51CTO博客,原文链接:http://blog.51cto.com/suyanzhu/1907146