问题描述
我尝试了很多方法来使用不同的方法编译我的 ArduPilot(从 GitHub 获取此代码)代码.
I tried a lot to compile my ArduPilot(got this code from GitHub) code using different method.
- 使用 Eclipse
- 命令行
此代码是用 C++ 语言编写的.
This code is written in C++ language.
我只想创建一个 make 文件来获取 .hex
文件,但到处都有同样的问题
I just want to create a make file to get .hex
file but everywhere I have got same problem
fatal: Not a git repository (or any of the parent directories): .git
我在 Mac OS 中工作,如何避免出现该错误消息?
I am doing work in Mac OS so how can I avoid that error message?
推荐答案
请确保:如果您创建文件,您不应该在 .git/
in 创建> 文件夹本身,但在其父文件夹中:
Just to be sure: if you create a file, you should not create in the .git/
folder itself, but in its parent folder:
myrepo
yourfile <===
.git/
.git/
文件夹包含代表您的 git 存储库的 git 数据/元数据.
父文件夹是存储库的工作树.
The .git/
folder include git data/metadata representing your git repo.
The parent folder is the working tree of the repo.
如果myrepo
"中没有 .git/
文件夹,请输入 git init .
If you don't have a .git/
folder in "myrepo
", type git init .
这篇关于致命:不是 git 存储库(或任何父目录):Mac OS 中的 .git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!