首页 > 其他分享 >Git运用 二 (Gitee版)

Git运用 二 (Gitee版)

时间:2023-02-14 10:05:09浏览次数:34  
标签:git tong get -- Gitee Git 运用 txt 日志


                     清屏 clear                                     清屏 clear                            清屏 clear

查看文本内容 cat get_tong.txt

Git运用 二 (Gitee版)_文件删除

 查看文件修改对比差异git diff  其中绿色为  未写入git本地仓库

Git运用 二 (Gitee版)_数据_02

 查看日志 git log

Git运用 二 (Gitee版)_文件删除_03

  git log --pretty=oneline

Git运用 二 (Gitee版)_文件删除_04

git reflog

Git运用 二 (Gitee版)_git_05

git reset --hard  aa653f0  

Git运用 二 (Gitee版)_文件删除_06

 恢复日志文件

Git运用 二 (Gitee版)_文件删除_07

文件删除:rm get_tong.txt

Git运用 二 (Gitee版)_git_08

git add get_tong.txtgit commit -m "delete file"

Git运用 二 (Gitee版)_数据_09

 第一种:恢复删除的数据: git reflog(查询出日志)  --> git reset --hard aa653f0 (恢复日志)

Git运用 二 (Gitee版)_git_10

 第二种:在文件夹里面删除

     

Git运用 二 (Gitee版)_git_11

  恢复方法:git checkout -- get_tong.txt

      

Git运用 二 (Gitee版)_文件删除_12

 

Git运用 二 (Gitee版)_git_13

标签:git,tong,get,--,Gitee,Git,运用,txt,日志
From: https://blog.51cto.com/u_15949848/6055553

相关文章