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

网络网站建设推广微网站和微信

网络网站建设推广,微网站和微信,贵州省遵义市建设局网站,福田祥菱v2双排后双轮报价一.问题描述 当我们在操作中手误删除了某个分支#xff0c;那该分支中提交的内容也没有了#xff0c;我们可以利用git reflog这个命令来查看历史提交的记录从而恢复被删除的分支和提交的内容 二.模拟问题 1.创建git仓库#xff0c;并提交一个文件 [rootcentos7-temp /da…一.问题描述 当我们在操作中手误删除了某个分支那该分支中提交的内容也没有了我们可以利用git reflog这个命令来查看历史提交的记录从而恢复被删除的分支和提交的内容 二.模拟问题 1.创建git仓库并提交一个文件 [rootcentos7-temp /data]# git init 已初始化空的 Git 仓库于 /data/.git/ [rootcentos7-temp /data]# vim test.txt[rootcentos7-temp /data]# cat test.txt 11111[rootcentos7-temp /data]# git add test.txt [rootcentos7-temp /data]# git commit -m first commit [master根提交 af8a35f] first commit1 file changed, 1 insertion()create mode 100644 test.txt 2.再次编辑test.txt文件并提交 [rootcentos7-temp /data]# vim test.txt [rootcentos7-temp /data]# cat test.txt 11111 22222 [rootcentos7-temp /data]# git add test.txt [rootcentos7-temp /data]# git commit -m second commit [master 9f10533] second commit1 file changed, 1 insertion() 3.查看当前所处分支和提交记录 #可以看到所处分支是在master分支在master分支中有两条提交记录 [rootcentos7-temp /data]# git branch * master[rootcentos7-temp /data]# git log commit 9f105338768642dd9306f4e0d83897847894176a (HEAD - master) Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 14:55:48 2023 0800second commitcommit af8a35fd2647b15059297c4d18d18de89f14601b Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 14:52:58 2023 0800first commit4.创建并切换至新分支 [rootcentos7-temp /data]# git checkout -b main 切换到一个新分支 main 5.查看当前所处分支 [rootcentos7-temp /data]# git branch * mainmaster6.在main分支上继续编辑test.txt文件并提交 [rootcentos7-temp /data]# vim test.txt [rootcentos7-temp /data]# cat test.txt 11111 22222 33333 [rootcentos7-temp /data]# git add test.txt [rootcentos7-temp /data]# git commit -m third commit [main 14cc0a8] third commit1 file changed, 1 insertion() 7.查看提交记录 [rootcentos7-temp /data]# git log commit 14cc0a8bc11ddb183d15241858108da85507d13c (HEAD - main) Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 15:06:10 2023 0800third commitcommit 9f105338768642dd9306f4e0d83897847894176a (master) Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 14:55:48 2023 0800second commitcommit af8a35fd2647b15059297c4d18d18de89f14601b Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 14:52:58 2023 0800first commit8.切换到master分支下然后删除main分支 [rootcentos7-temp /data]# git checkout master 切换到分支 master[rootcentos7-temp /data]# git branch -D main 已删除分支 main曾为 14cc0a8。9.查看所有分支验证下main分支是否真的被删除了 [rootcentos7-temp /data]# git branch * master 10.查看提交记录 #分支因为没有合并到master分支就被删除了。所以此时master分支没有main分支上做的新的修改记录 [rootcentos7-temp /data]# git log commit 9f105338768642dd9306f4e0d83897847894176a (HEAD - master) Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 14:55:48 2023 0800second commitcommit af8a35fd2647b15059297c4d18d18de89f14601b Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 14:52:58 2023 0800first commit 三.恢复main分支 1.查看所有分支的操作记录对比之前在main分支查看的提交记录 2.根据main的最后一次提交记录来恢复main分支 [rootcentos7-temp /data]# git checkout -b main 14cc0a8 切换到一个新分支 main[rootcentos7-temp /data]# git branch * mainmaster[rootcentos7-temp /data]# git log commit 14cc0a8bc11ddb183d15241858108da85507d13c (HEAD - main) Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 15:06:10 2023 0800third commitcommit 9f105338768642dd9306f4e0d83897847894176a (master) Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 14:55:48 2023 0800second commitcommit af8a35fd2647b15059297c4d18d18de89f14601b Author: zhanghongshun 748749875qq.com Date: Sun Feb 12 14:52:58 2023 0800first commit
http://www.hkea.cn/news/14526883/

相关文章:

  • 校园网站建设宣传网站建设工程师的职位要求
  • 横沥建设网站广告设计公司属于什么行业
  • 网站建设说课ppt网站建设实训的目的
  • 做国外有那些网站网站建设 中企动力福州阀门
  • 怎么做视频平台网站删除自豪地采用wordpress
  • 西安网站建设培训学校微信网站有什么作用
  • 丹东谁做微网站二手网站怎么做
  • 如何把jQuery特效做网站背景一站式服务大厅
  • 牛天下网站建设北京 网站建设 招标信息
  • 搜狗网站优化软件手机网站内容管理
  • 建立中文网站的英文wordpress婚礼主题公园
  • 网站建设需要了解的智慧门店管理服务平台
  • 渭南网站建设公司定制网站建设公司手机网站大全1
  • 同仁微网站建设工作室工业设计在线官网
  • 建设部机关服务中心网站哪个网站可以做视频
  • 丰台深圳网站建设公司如何辨别官方网站
  • 网站常规seo优化步骤建设网站cms
  • 如何做电影网站赚钱wordpress搜索结果页样式
  • 大学专业网站wordpress 手机维修
  • 运营什么网站好拍摄网
  • 宝塔面板怎么建设网站网站建站费用多少钱
  • 建设网站需要的编程800元五合一建站
  • 泰州市建设工程质量监督站网站wordpress修改域名文件
  • 北京南站到北京西站地铁怎么走wordpress cu主题
  • 手机网站建站平台k8s wordpress
  • 做网站用什么浏览器最好seo排名教程技术
  • 一流的免费网站建设wordpress使用cdn图片不显示
  • 佛山o2o网站建设天元建设集团有限公司联系电话
  • 国外平面设计师网站林业厅网站建设方案
  • 江苏企业网站排名优化蓝牙 技术支持 东莞网站建设