修改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
命令行输出
本文转自 素颜猪 51CTO博客,原文链接:http://blog.51cto.com/suyanzhu/1907146