当从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. shell编程学习笔记【原创】

    本文为本人学习笔记,如有转载请注明出处,谢谢 一.Bourne Shell 有如下四种变量: 用户自定义变量 位置变量,即命令行参数 预定义变量 环境变量 二.位置变量 $ 与键入的命令行一样,包含脚 ...

  2. 非MFC工程中使用MFC库

    目录(?)[-] 需求说明 常见问题 问题分析 参考解决方法 我的解决方案 Stdafxh的原理   需求说明 C++工程的类型有很多,从VS(或VC)可以看到常见的有:Win32 Console A ...

  3. Flask-Migrate拓展数据库表结构

    # 转载请留言联系 在我们用 sqlchemy 模块创建完几个表时,如果在实际生产环境中,需要对表结构进行更改,应该怎么办呢?总不能把表删除了吧,这样数据就会丢失了. 更好的解决办法是使用数据库迁移框 ...

  4. python接口自动化8-参数化【转载】

    本篇转自博客:上海-悠悠 原文地址:http://www.cnblogs.com/yoyoketang/tag/python%E6%8E%A5%E5%8F%A3%E8%87%AA%E5%8A%A8%E ...

  5. 第一章:1-22、长度为100字节的应用层数据交给运输层传送,需加上20字节的TCP首部。再交给网络层传送,需加上20字节的IP首部。最后交给数据链路层的以太网传送,加上首部和尾部18字节。试求数据的传输效率。  若应用层数据长度为1000字节,数据的传输效率是多少?

    <计算机网络>谢希仁著第四版课后习题答案答: 数据长度为100字节时 传输效率=100/(100+20+20+18)=63.3% 数据长度为1000字节时, 传输效率=1000/(1000 ...

  6. poj2181 jumping cow

    umping Cows Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7579   Accepted: 4559 Descr ...

  7. AC日记——Little Elephant and Array codeforces 221d

    221D - Little Elephant and Array 思路: 莫队: 代码: #include <cmath> #include <cstdio> #include ...

  8. @Transactional注解事务不起作用

    @Transactional注解事务不起作用 问题:今天在项目中碰到一个事务问题,使用@Transactional注解事务,抛出异常不会滚. 解决一:https://blog.csdn.net/u01 ...

  9. 腾讯消消乐 (状态压缩DP)

    腾讯消消乐 题意 给出长度为 n 的序列,每次可以选择删除序列的一个连续区间,要求这一段区间内所有数最大公约数不小于 k ,删除后剩下的序列仍然构成连续序列. 定义 f(i) 为进行 i 次操作将整个 ...

  10. 分析dump

    一.使用jmap工具生成dump文件 二.MAT工具的下载和安装 三.使用MAT工具进行内存泄露分析  -- Step 1 :  ps –ef | grep <process> (whic ...