当从github.com上面下载下了Firmware后。无意中删除了Firmware文件夹下的.git文件夹,再去编译就会出现:

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

的错误。这是因为本地版本号管理仓库被删除了,须要又一次初始化仓库,建立新的仓库:

  git init



  再次去编译又会出现例如以下错误:

  fatla: bad default revision ‘HEAD’

这是因为仓库里没有任提交在里面,所以它会报这个错。再运行以下的命令:

查看仓库状态:

  git status

加入本地project全部文件到仓库中:

  git add -A

提交到仓库:

  git commit -m “custom your message”



再次去编译就不会有问题了。

Pixhawk---fatal: Not a git repository (or any of the parent directories)的更多相关文章

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

    在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...

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

    $ git remote add origin https://github.com/heyuanchao/YouxibiClient.gitfatal: Not a git repository ( ...

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

    git错误:fatal: Not a git repository (or any of the parent directories): .git 我用git add file添加文件时出现这样错误 ...

  4. git远程库与本地联系报错fatal: Not a git repository (or any of the parent directories): .git

    在github上新建了一个仓库,然后相与本地的仓库联系起来 $ git remote add origin https://github.com/liona329/learngit.git fatal ...

  5. git status出现 fatal: Not a git repository (or any of the parent directories): .git

    fatal: Not a git repository (or any of the parent directories): .git 提示说没有.git这样一个目录,解决办法如下: git ini ...

  6. git远程库与本地联系报错:fatal: Not a git repository (or any of the parent directories): .git

    在github上新建了一个仓库,然后相与本地的仓库联系起来 $ git remote add origin https://github.com/lizhong24/mysite2.git fatal ...

  7. 【Git初探】Git中fatal: Not a git repository (or any of the parent directories): .git错误的解决办法

    今天用git bash更新项目时遇到了无论使用什么命令都会报fatal: Not a git repository (or any of the parent directories): .git的情 ...

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

    当从github.com上面下载下了Firmware后,无意中删除了Firmware目录下的.git文件夹,再去编译就会出现:   fatal: Not a git repository (or an ...

  9. 初学git,出现错误:fatal: Not a git repository (or any of the parent directories): .git

    提示说没有.git这样一个目录,解决办法: 输入  git init 就可以啦.

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

    在项目目录下执行git init命令. 大功告成.

随机推荐

  1. Linux驱动修炼之道-SPI驱动框架源码分析(上)【转】

    转自:http://blog.csdn.net/lanmanck/article/details/6895318 SPI驱动架构,以前用过,不过没这个详细,跟各位一起分享: 来自:http://blo ...

  2. python 独立环境安装

    python 即使是单独编译安装的,库文件的安装还是会与其它python的库存放到相同的地方 使用同版本库不会有问题,但是需要升级库的时候,就会出现冲突,导致依赖这个旧库的python出现问题 这时候 ...

  3. 2.OpenStack-安装消息队列服务

    安装消息队列服务(安装在控制器上) yum install rabbitmq-server -y systemctl start mariadb.service 配置消息队列服务 systemctl ...

  4. python3中用HTMLTestRunner.py报ImportError: No module named 'StringIO'如何解决【转载】

    原文转自:http://bbs.chinaunix.net/thread-4154743-1-1.html python3中用HTMLTestRunner.py报ImportError: No mod ...

  5. springBoot 微服务

    微服务,是OO (面向对象,Object Oriented) 专家 Martin Fowler 于2014年在他一篇文章<Microservice>提出的.在 Mattin 的头脑中,兴奋 ...

  6. easyui常用

    清空列表选中项 //easyui datagrid 清空勾选 $('#List').datagrid('clearSelections'); 扩展修改查询方法 function QueryList() ...

  7. linux 系统的负载与CPU、内存、硬盘、用户数监控脚本[marked]

    转载文章 原始出处  在没有nagios监控的情况下,只要服务器能上互联网,就可通过发邮件的方式来提醒管理员系统资源的使用情况. 一.编写linux系统告警邮件脚本 # vim /scripts/sy ...

  8. android 效果

    1.TextView 有边界的水波效果: android:background="?android:attr/selectableItemBackground" 无边界的水波效果: ...

  9. android 错误

    问题1 手机开发者选项 开启USB安装 问题2 怎么变成了两行 问题3 运行虚拟机报错 电脑没有启用虚拟技术或者没有安装Intel HAXM软件 sdk下找到 (或者官网下载 https://soft ...

  10. (24)C#log4net配置和使用

    一.下载并引用log4 DLL下载  http://logging.apache.org/  找到.net版本的 点击下载 找到编译好的bin 选择net 选择你项目对应的.net framework ...