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

【问题解决】Git命令行常见error及其解决方法

 

以下是我一段时间没有使用xshell,然后用git命令行遇到的一些系列错误和他们的解决方法

 遇到了这个报错:

fatal: Not a git repository (or any of the parent directories): .git

我查阅一些博客和资料,可以解决的方式:

git init

 在我进行git push提交文件时,我遇到了下面这个报错

fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository usinggit remote add <name> <url>and then push using the remote namegit push <name>

 解决方式:

 git remote add origin 'http://git.....'git push -u origin master

出现了这个报错:

 解决方式:

git pull --rebase origin master

遇到的报错:

error: The following untracked working tree files would be overwritten by checkout

解决方式:

git clean -d -fx

遇到的报错:

** Please tell me who you are.Rungit config --global user.email "you@example.com"git config --global user.name "Your Name"to set your account's default identity.
Omit --global to set the identity only in this repository.fatal: unable to auto-detect email address (got 'lvyp@NEU-20190128LYP.(none)')

 解决方式:

意思是说你在创建本地仓库时未定义用户名和邮箱,此时再按照错误提示,利用

git config --global user.name "follow"
git config --global user.email "follow@qq.com"

再跟上一句

git config --local -l

 

http://www.lryc.cn/news/123056.html

相关文章:

  • 【100天精通python】Day34:使用python操作数据库_ORM(SQLAlchemy)使用
  • CCLINK IE转MODBUS-TCP网关modbus tcp协议详解
  • vue2根据不同的电脑分辨率显示页面内容及不同设备适配显示
  • 概率论:多维随机变量及分布
  • flutter-第三方组件
  • 迪瑞克斯拉算法
  • 数据结构:力扣OJ题(每日一练)
  • 【论文阅读】基于深度学习的时序预测——Informer
  • 机器学习 | Python实现GBDT梯度提升树模型设计
  • elementUi表单恢复至初始状态并不触发表单验证
  • 大模型相关知识
  • 无法在 macOS Ventura 上启动 Multipass
  • 算法通关村第六关——原来如此简单
  • 企业权限管理(八)-登陆使用数据库认证
  • 第一百二十五天学习记录:C++提高:STL-deque容器(下)(黑马教学视频)
  • 案例12 Spring MVC入门案例
  • 【React】精选10题
  • VS Spy++进程信息获取
  • Java课题笔记~ SpringMVC概述
  • SOPC之NIOS Ⅱ遇到的问题
  • uniapp uni-datetime-picker 日期和光标靠右
  • 关于axios请求中的GET、POST、PUT、DELETE的一些认知
  • go-zero 是如何做路由管理的?
  • Springboot集成ip2region离线IP地名映射-修订版
  • 智能驾驶系列报告之一:智能驾驶 ChatGPT时刻有望来临
  • 设计HTML5文档结构
  • vue echarts中按钮点击后修改值 watch数据变化后刷新图表
  • React antd tree树组件 - 父子节点没有自动关联情况下 - 显示半选、全选状态以及实现父子节点互动
  • 优漫动游 大厂需要什么样的ui设计师呢?
  • TiDB Bot:用 Generative AI 构建企业专属的用户助手机器人