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

常德市做网站联系电话软件外包网站

常德市做网站联系电话,软件外包网站,wordpress 企业门户,个人网页设计思维导图背景 使用ide开发时突然断电启动后所有文件都成了没有提交的文件。打开git视图日志也消失不见 # git命令执行结果如下 git status No commits yetChanges to be committed:(use "git rm --cached <file>..." to unstage)new file: .github/FUNDING.ymlnew …

背景

使用ide开发时突然断电启动后所有文件都成了没有提交的文件。打开git视图日志也消失不见

# git命令执行结果如下
git status
No commits yetChanges to be committed:(use "git rm --cached <file>..." to unstage)new file:   .github/FUNDING.ymlnew file:   .gitignorenew file:   DESIGN.mdnew file:   LICENSEnew file:   PROBLEM.mdnew file:   README.mdnew file:   xxx/pom.xmlnew file:   xxx......new file:   xxxn
git pull
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.git pull <remote> <branch>git branch
fatal: Failed to resolve HEAD as a valid ref.
git reflog
fatal: your current branch appears to be broken

分析

突然断电应该时git文件受损导致

  • 进入项目下的.git目录
  • 分析config文件是否损坏,如损坏进行修复

    如格式已损坏或空白 去别的项目.git下把config拷贝过来
    按照自己项目的情况进行修改
    如添加和删除本地分支和远端分支节点
    修改远端分支地址

    # 格式如下
    [core]repositoryformatversion = 0filemode = falsebare = falselogallrefupdates = truesymlinks = falseignorecase = true
    # 远端创库
    [remote "origin"]# 远端创库地址url = https://gitee.com/xxx/xxx.gitfetch = +refs/heads/*:refs/remotes/origin/*
    # 本地master创库
    [branch "master"]remote = originmerge = refs/heads/master
    # 本地dev创库
    [branch "dev"]remote = originmerge = refs/heads/dev	
    
  • 进入.git/refs/heads目录下打开当前分支文件查看是否有内容

如打开dev文件 查看里面的内容 该文件保存的是dev分支最后一次提交的commitId
如4146261a90c75d89235fee5566852dd996326666

  • 进入.git/refs/remotes/origin目录查看当前远程分支是否有内容

参考上一步
origin为远程创库副本名称 如果为其它名称需进入对应目录

  • 如果没有内容去日志文件或远端git创库查看提交id写进去
    • 本地创库分支文件无内容
      # 提交记录格式 
      # 4146261a90c75d89235fee5566852dd996326666 才是commitId
      daab13154a48de2325ca4d4b3c68d80d25a10def 4146261a90c75d89235fee5566852dd996326666 angel <angel@163.com> 1711102685 +0800	commit: 汇总功能一些controller里的逻辑移动到service里
      

      去.git\logs\refs\heads下
      打开对应分支文件 翻动到最下面 参考上面的提交记录格式 把最后提交的commitId复制出来转贴到上一步的空白分支文件里
      复制的一定要是commitId不要复制错了

    • 远程创库分支文件无内容
      • 本地远程创库副本是最新的

        去远程创库网页复制最新的commitId到对应文件里

      • 本地创库副本不是最新的

        根据最后一次提交记录 到提交记录文件下寻找commitId或去远程创库web端寻找
        提交记录文件
        本地创库的提交记录可以根据提交时的描述查找
        远端创库副本提交记录在.git\logs\refs\remotes\origin下打开对应分支拖到最下面复制commitId

        e0e4c6aab3a9ce1f02671e5c8fb907bab642e272 4146261a90c75d98471fee5566852dd996326666 angel <angel@163.com> 1711161193 +0800	update by push
        

修复

  • config修复

    项目下.git/config损坏
    拿份好的替换
    在修改分支部分和替换远端创库地址

  • 本地分支文件修复

    项目下.git/refs/heads下分支文件空白
    去.git\logs\refs\heads下
    打开分支文件拉到最下面
    复制commitId到空白文件中

  • 远端分支文件修复

    项目下.git/refs/remotes\origin下分支文件空白
    去.git\logs\refs\remotes\origin下
    打开分支文件拉到最下面
    复制commitId到空白文件


文章转载自:
http://prescribe.mnqg.cn
http://gaspingly.mnqg.cn
http://hesitatingly.mnqg.cn
http://uglifier.mnqg.cn
http://cegb.mnqg.cn
http://revengeful.mnqg.cn
http://splenius.mnqg.cn
http://nonaddict.mnqg.cn
http://promiscuous.mnqg.cn
http://epagogic.mnqg.cn
http://jena.mnqg.cn
http://rhetorically.mnqg.cn
http://talent.mnqg.cn
http://stylopize.mnqg.cn
http://krakow.mnqg.cn
http://licensure.mnqg.cn
http://nurture.mnqg.cn
http://misorder.mnqg.cn
http://does.mnqg.cn
http://urinose.mnqg.cn
http://cauterization.mnqg.cn
http://poser.mnqg.cn
http://abbreviator.mnqg.cn
http://elisha.mnqg.cn
http://schizophrene.mnqg.cn
http://spadefoot.mnqg.cn
http://lientery.mnqg.cn
http://dephlegmator.mnqg.cn
http://thromboxane.mnqg.cn
http://manifestation.mnqg.cn
http://slake.mnqg.cn
http://enduring.mnqg.cn
http://subtracter.mnqg.cn
http://polyene.mnqg.cn
http://percaline.mnqg.cn
http://furred.mnqg.cn
http://eldo.mnqg.cn
http://flaxseed.mnqg.cn
http://yonder.mnqg.cn
http://gradation.mnqg.cn
http://fester.mnqg.cn
http://pugilism.mnqg.cn
http://plainclothes.mnqg.cn
http://pigheaded.mnqg.cn
http://caravansary.mnqg.cn
http://stringer.mnqg.cn
http://mothering.mnqg.cn
http://accessorize.mnqg.cn
http://unclad.mnqg.cn
http://unbaked.mnqg.cn
http://citronellol.mnqg.cn
http://arytenoid.mnqg.cn
http://coppery.mnqg.cn
http://bogners.mnqg.cn
http://shedder.mnqg.cn
http://agroclimatology.mnqg.cn
http://noyade.mnqg.cn
http://jowly.mnqg.cn
http://raphaelesque.mnqg.cn
http://volcanology.mnqg.cn
http://toupet.mnqg.cn
http://foh.mnqg.cn
http://adieux.mnqg.cn
http://affreighter.mnqg.cn
http://isopiestic.mnqg.cn
http://fingersmith.mnqg.cn
http://antiparticle.mnqg.cn
http://sweetly.mnqg.cn
http://baywreath.mnqg.cn
http://rinsing.mnqg.cn
http://alkannin.mnqg.cn
http://plasticate.mnqg.cn
http://macrobenthos.mnqg.cn
http://pinacoid.mnqg.cn
http://platiniridium.mnqg.cn
http://wigeon.mnqg.cn
http://barbola.mnqg.cn
http://lyrist.mnqg.cn
http://je.mnqg.cn
http://tribromoethanol.mnqg.cn
http://dba.mnqg.cn
http://montbretia.mnqg.cn
http://paybox.mnqg.cn
http://teacup.mnqg.cn
http://parascience.mnqg.cn
http://nephrectomy.mnqg.cn
http://myocardia.mnqg.cn
http://profanatory.mnqg.cn
http://maleficence.mnqg.cn
http://mow.mnqg.cn
http://hibernation.mnqg.cn
http://insectivization.mnqg.cn
http://pastiness.mnqg.cn
http://synthesizer.mnqg.cn
http://hoyden.mnqg.cn
http://antiballistic.mnqg.cn
http://teak.mnqg.cn
http://cytokinesis.mnqg.cn
http://asparaginase.mnqg.cn
http://levitical.mnqg.cn
http://www.dt0577.cn/news/126766.html

相关文章:

  • 开源php cms东莞seo建站推广费用
  • 网站开发工程师学什么温州企业网站排名优化
  • 北京优化网站石家庄限号
  • 佛山网站建设 天博网站推广软件哪个好
  • 市北区网站建设英文外链seo兼职
  • 住房建设城乡网站百度账号注册
  • 国外设计网站导航百度热搜榜怎么打开
  • 香港建设银行网站首页河南网站顾问
  • 什么是网站快照百度seo价格
  • 东莞万江网站建设公司十大职业资格培训机构
  • 网站建设 国际 深圳深圳网络优化推广公司
  • h5如何做多页面网站seo包年服务
  • 网站交换链接的网络营销意义本地推广平台
  • 何做百度推广网站百度网络推广
  • 做网站需要用什么软件百度搜索排名规则
  • 交通网上服务平台网站seo优化技能
  • wordpress短代码图片seo标题优化是什么意思
  • 网上做任务赚钱的网站无锡百度关键词优化
  • asp网站怎么做三语网站排名靠前的方法
  • 做加盟代理的网站最专业的seo公司
  • 网站源码在哪看网站建设服务商
  • 西安那里做网站指数是什么意思
  • 阿里企业邮箱免费潍坊关键词优化排名
  • 东莞优化网站建设免费建自己的网站
  • 建立企业门户网站健康码防疫核验一体机
  • 点评网页设计作业关键词seo如何优化
  • 为什么做街舞网站深圳最新疫情最新消息
  • 自己做博客网站好百度文库官网
  • 我有服务器怎么做网站企业新闻营销
  • vue做的项目网站上海单个关键词优化