zoukankan      html  css  js  c++  java
  • git使用中常见报错解决方法

    1、hint: You've added another git repository inside your current repository.

          大概意思:在当前的仓库中还包含有另一个.git仓库而且不知道这两个仓库的嵌套关系。

          解决方法:git rm --caches phto

    2、 ! [rejected]        master -> master (fetch first)

          大概意思:因为github上的远程库与本地库版本不一致

          解决方法:

          一、先拉一遍再上传

                 1、更新 git fetch origin master

                 2、比较本地的仓库和远程参考的区别
                      $ git log -p master.. origin/master
                 3、把远程下载下来的代码合并到本地仓库,远程的和本地的合并
                      $ git merge origin/master

          二、暴力覆盖,直接将远程仓库里的文件覆盖掉

                      $ git push -f origin master

    3、fatal: remote origin already exists.

          解决方法:

          1、先移除  git remote rm origin   

          2、再添加  git remote add origin https://github.com/......

    4、[git]warning: LF will be replaced by CRLF in

          大概意思:需要提交的文件是在windows下生成的,windows中的换行符为 CRLF, 而在linux下的换行符为LF,所以在执行add . 时出现提示

          解决方法:

          1、git config --global core.autocrlf false   

          2、再执行一遍git 提交

  • 相关阅读:
    Nacos启动异常:failed to req API:/api//nacos/v1/ns/instance after all servers([127.0.0.1:8848])
    多节点集群思路
    内网dns配置
    MySQL集群配置思路
    pycharm常用快捷键
    2020年11月新版CKA考试心得
    JavaScript的Map、Set、WeakMap和WeakSet
    AJAX传输二进制数据
    linux性能监测与优化的指令
    八千字硬核长文梳理Linux内核概念及学习路线
  • 原文地址:https://www.cnblogs.com/MrTager/p/12896212.html
Copyright © 2011-2022 走看看