致命:不是git存储库(或任何父目录):在Mac OS中为.git [英] fatal: Not a git repository (or any of the parent directories): .git in Mac OS
问题描述
我尝试使用不同的方法来编译我的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/
文件夹本身中的中创建,而应在其.git/
文件夹中创建父文件夹:
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!