Git 查看更改

当向仓库中添加文件或删除文件后,可能需要查看更改。

查看更改有多种方式。

1、查看状态

# git status

结果

1
2
# 位于分支 master
无文件要提交,干净的工作区

2、查看日志

# git log

结果

1
2
3
4
5
commit fc5601107240aae6dd592230c9c3ebb3d6ce8ab5
Author: wsh <[email protected]>
Date:   Fri May 18 21:33:35 2018 +0800
  
     first commit

3、以图形方式查看

1
2
3
4
# git log --graph --oneline
* 117adf3 删除 hello.txt
* 7c1b9ee 添加 hello.txt
* 1d54d92 Initial commit

猜你喜欢

转载自www.cnblogs.com/max-hou/p/12040264.html