当前位置: 首页 > news >正文

手机网站如何建设广告推广宣传

手机网站如何建设,广告推广宣传,在线音乐网站开发摘要,网页框架一.问题描述 当我们在操作中手误删除了某个分支,那该分支中提交的内容也没有了,我们可以利用git reflog这个命令来查看历史提交的记录从而恢复被删除的分支和提交的内容 二.模拟问题 1.创建git仓库,并提交一个文件 [rootcentos7-temp /da…

一.问题描述

当我们在操作中手误删除了某个分支,那该分支中提交的内容也没有了,我们可以利用git reflog这个命令来查看历史提交的记录从而恢复被删除的分支和提交的内容

二.模拟问题

1.创建git仓库,并提交一个文件

[root@centos7-temp /data]# git init
已初始化空的 Git 仓库于 /data/.git/
[root@centos7-temp /data]# vim test.txt[root@centos7-temp /data]# cat test.txt 
11111
[root@centos7-temp /data]# git add test.txt
[root@centos7-temp /data]# git commit -m "first commit"
[master(根提交) af8a35f] first commit1 file changed, 1 insertion(+)create mode 100644 test.txt

2.再次编辑test.txt文件并提交

[root@centos7-temp /data]# vim test.txt [root@centos7-temp /data]# cat test.txt 
11111
22222
[root@centos7-temp /data]# git add test.txt 
[root@centos7-temp /data]# git commit -m "second commit"
[master 9f10533] second commit1 file changed, 1 insertion(+)

3.查看当前所处分支和提交记录

#可以看到所处分支是在master分支,在master分支中有两条提交记录

[root@centos7-temp /data]# git branch
* master[root@centos7-temp /data]# git log
commit 9f105338768642dd9306f4e0d83897847894176a (HEAD -> master)
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 14:55:48 2023 +0800second commitcommit af8a35fd2647b15059297c4d18d18de89f14601b
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 14:52:58 2023 +0800first commit

4.创建并切换至新分支

[root@centos7-temp /data]# git checkout -b main
切换到一个新分支 'main'

5.查看当前所处分支

[root@centos7-temp /data]# git branch
* mainmaster

6.在main分支上继续编辑test.txt文件并提交

[root@centos7-temp /data]# vim test.txt [root@centos7-temp /data]# cat test.txt 
11111
22222
33333
[root@centos7-temp /data]# git add test.txt 
[root@centos7-temp /data]# git commit -m "third commit"
[main 14cc0a8] third commit1 file changed, 1 insertion(+)

7.查看提交记录

[root@centos7-temp /data]# git log
commit 14cc0a8bc11ddb183d15241858108da85507d13c (HEAD -> main)
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 15:06:10 2023 +0800third commitcommit 9f105338768642dd9306f4e0d83897847894176a (master)
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 14:55:48 2023 +0800second commitcommit af8a35fd2647b15059297c4d18d18de89f14601b
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 14:52:58 2023 +0800first commit

8.切换到master分支下,然后删除main分支

[root@centos7-temp /data]# git checkout master
切换到分支 'master'[root@centos7-temp /data]# git branch -D main
已删除分支 main(曾为 14cc0a8)。

9.查看所有分支,验证下main分支是否真的被删除了

[root@centos7-temp /data]# git branch
* master

10.查看提交记录

#分支因为没有合并到master分支,就被删除了。所以此时master分支没有main分支上做的新的修改记录

[root@centos7-temp /data]# git log
commit 9f105338768642dd9306f4e0d83897847894176a (HEAD -> master)
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 14:55:48 2023 +0800second commitcommit af8a35fd2647b15059297c4d18d18de89f14601b
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 14:52:58 2023 +0800first commit

三.恢复main分支

1.查看所有分支的操作记录,对比之前在main分支查看的提交记录

 

 2.根据main的最后一次提交记录来恢复main分支

[root@centos7-temp /data]# git checkout -b main 14cc0a8
切换到一个新分支 'main'[root@centos7-temp /data]# git branch
* mainmaster[root@centos7-temp /data]# git log
commit 14cc0a8bc11ddb183d15241858108da85507d13c (HEAD -> main)
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 15:06:10 2023 +0800third commitcommit 9f105338768642dd9306f4e0d83897847894176a (master)
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 14:55:48 2023 +0800second commitcommit af8a35fd2647b15059297c4d18d18de89f14601b
Author: zhanghongshun <748749875@qq.com>
Date:   Sun Feb 12 14:52:58 2023 +0800first commit
http://www.khdw.cn/news/41000.html

相关文章:

  • 做企业网站用什么cms好新闻软文推广案例
  • css做电商网站首页网站排名优化培训课程
  • wordpress 缩略图裁剪seo优化排名易下拉用法
  • 有什么网站是专门做电商详情页北京网站优化页面
  • 十大营销网站游戏推广员招聘
  • 长春市做网站哪家好百度权重排名
  • 宁波网站建设优化免费二级域名分发网站
  • 腾讯云wordpressseo百度推广
  • 有哪些可以做推广的网站百度广告一级代理
  • 商城网站开发嵌入支付宝1688关键词排名查询工具
  • 江苏宏澄建设有限公司网站石家庄新闻最新消息
  • 怎么做网站销售seo网站营销推广公司
  • 贵阳网站商城建设一级消防工程师考试
  • 电脑做系统网站如何做市场调研和分析
  • 策划文案的网站2022最新时事新闻及点评
  • 建企业网站用什么源码seo蜘蛛屯
  • 淘宝客网站怎么做推广百度搜索广告怎么收费
  • 用自己电脑做网站服务器网络销售公司
  • wordpress本地渗透成都网站seo外包
  • 安徽设计公司站长工具seo客户端
  • 深圳好客站seo2020年百度搜索排名
  • pc端网站手机版怎么做广州知名网络推广公司
  • 遵义做网站多少钱全网关键词搜索排行
  • 做标签的网站百度访问量统计
  • 官网静态html模板优化整站
  • 汉中网站建设淄博seo公司
  • 邵阳 做网站公司google谷歌搜索引擎
  • 连云港做网站建设网站推广优化价格
  • 网站SEM优化如何做百度爱采购竞价推广
  • 网站建设公司正规吗山东做网站公司