当从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. 给dedeCMS自定义模型添加图片集字段

    1.先找到dedecms图片集模型的templets生成图片集的html代码(album_add.htm) <tr>      <td height="24"  ...

  2. BeeUISignal详解

    https://github.com/i5ting/Bee_Tutorial/wiki/BeeUISignal%E8%AF%A6%E8%A7%A3 BeeUISignal是beeframework的核 ...

  3. opengl glEnableClientState() 和 glDisableClientState() 作用

    http://zhidao.baidu.com/link?url=c3m55lgpjhU1Rb7TEP-aTGQAX3-GrcBk5NaUC2UA1ZtQiCCtHJzB_KoG7pWvPEybfYv ...

  4. shiro配置参考(一)

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:xsi="http://ww ...

  5. jquery_EasyUI使用细节注意

    一.属性key不加双引号,value加双引号,对于url的value,添加‘’单引号:url的访问地址可以使用以下格式: datagrid中的url格式: var datagrid; $(functi ...

  6. 右上角X灰化

    CMenu* menu = this->GetSystemMenu(FALSE); menu->EnableMenuItem(SC_CLOSE, MF_BYCOMMAND | MF_GRA ...

  7. 天猫首页迷思之-jquery实现整个div的懒加载(1)

    懒加载是众所周知的减少网页负载,提高性能的方法,不少大型用图片用的多的网站都用到了. 于是我网上一搜,得到一插件:jquery.lazyload    网址:http://www.appelsiini ...

  8. js-获取用户移动端网络类型:wifi、4g、3g、2g...

    今天工作时间很宽裕, 忽然想起,自己做过的所有页面中,有些页面经常会面临用户在网络状态很差的时候打开页面,页面是挂了的状态,感觉很LOW~. 所以我决定在今后的页面中我需要先判断用户的网络状态, 若是 ...

  9. 洛谷 P1739 表达式括号匹配【STL/stack/模拟】

    题目描述 假设一个表达式有英文字母(小写).运算符(+,-,*,/)和左右小(圆)括号构成,以"@"作为表达式的结束符.请编写一个程序检查表达式中的左右圆括号是否匹配,若匹配,则返 ...

  10. springmvc使用StringHttpMessageConverter需要配置编码

    Spring controller 如下 @Controller public class SimpleController { @ResponseBody @RequestMapping(value ...