git diff HEAD – readme.txt 查看工作区和版本库里面最新版本的区别
[root@localhost 222]# vim aaa (修改)
[root@localhost 222]# git add aaa (添加到暂存区)
[root@localhost 222]# vim aaa (再修改)
[root@localhost 222]# git status (查看仓库状态)
位于分支 devd
要提交的变更:
(使用 "git restore --staged <文件>..." 以取消暂存)
修改: aaa
尚未暂存以备提交的变更:
(使用 "git add <文件>..." 更新要提交的内容)
(使用 "git restore <文件>..." 丢弃工作区的改动)
修改: aaa
[root@localhost 222]# git commit -m ccc (提交到仓库)
[devd b22366c] ccc
1 file changed, 1 insertion(+), 4 deletions(-)
[root@localhost 222]# git status (查看仓库状态)
位于分支 devd
尚未暂存以备提交的变更:
(使用 "git add <文件>..." 更新要提交的内容)
(使用 "git restore <文件>..." 丢弃工作区的改动)
修改: