git reset HEAD使用

git reset HEAD使用

修改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使用