码迷,mamicode.com
首页 > 其他好文 > 详细

git reset HEAD使用

时间:2017-03-16 22:51:46      阅读:456      评论:0      收藏:0      [点我收藏+]

标签:reset   git   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

命令行输出

技术分享

本文出自 “素颜” 博客,请务必保留此出处http://suyanzhu.blog.51cto.com/8050189/1907146

git reset HEAD使用

标签:reset   git   head   

原文地址:http://suyanzhu.blog.51cto.com/8050189/1907146

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!