版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_41179401/article/details/86361321
linux--git的使用
1 安装git
yum -y install git
2 从githup中克隆文件
git clone https://github.com/..地址./文件.git
3 查看状态
git status
4 添加一个文件a
git add a
5 提交文件
git comment
提示 配置信息
6 提交到githup上
git push
提交时填写用户名和密码
7 查看提交的历史操作
git log
8 恢复到历史版本
使用 git log命令查看对应版本的commit 后对应的值
git reset --hard 89631a18128f4e16e70114e5e4983c96420726bb
9 使用git reflog查看所有分支的所有操作记录(包括已经被删除的 commit 记录和 reset 的操作)
git reflog