当从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. Windows消息类型

    WM_ Window Message 窗口消息,一般用在SendMessage,PostMessage这样的消息函数中 SM_ Static Message 静态标签消息 SS_ Static Sty ...

  2. python每日一类(3):os和sys

    os与sys模块的官方解释如下: os: This module provides a portable way of using operating system dependent functio ...

  3. hdu 5104(数学)

    Primes Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)To ...

  4. 鸭子-策略模式(Strategy)

    前言 万事开头难,最近对这句话体会深刻!这篇文章是这个系列正式开始介绍设计模式的第一篇,所以肩负着确定这个系列风格的历史重任,它在我脑袋里默默地酝酿了好多天,却只搜刮出了一点儿不太清晰的轮廓,可是时间 ...

  5. 写给小白看的 JavaScript 异步

    某天突然写了个方法要从后台调用数据,显示在前台页面,但是输出结果总是空 undefined,得不到数据.多方找资料才发现,原来是入了 JS 异步的 “坑”. 我们常常听到单线程.多线程.同步.异步这些 ...

  6. IE常见兼容问题

    图片有边框 CSS 增加 border:0; border,在IE 模式下不算在宽度内;

  7. IO 最快的read 和 write

    import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; impo ...

  8. bzoj 5346: tree (其实是是某次雅礼集训的题)

    用prufer序列的公式直接dp,O(n^4)的算法简简单单就写出来了23333. 按理说 O(n^4)是需要优化成O(n^3)才能过的,然鹅我也不知道我怎么过了23333 (那就懒得优化了hhhhh ...

  9. 【bzoj4403】【序列统计】不降转升+组合数添项合并

    (上不了p站我要死了,侵权度娘背锅) Description 给定三个正整数N.L和R,统计长度在1到N之间,元素大小都在L到R之间的单调不降序列的数量.输出答案对10^6+3取模的结果. Input ...

  10. 1.13抽象类及接口(附简述final关键字)

    一.final final的中文意思就是不可更改的,最终的. 1.final修饰变量,那么该变量无法更改.一旦该变量赋了初值,就不能重新赋值. final MAX = 1100; //final修饰后 ...