致命:不是git存储库(或任何父目录):在Mac OS中为.git [英] fatal: Not a git repository (or any of the parent directories): .git in Mac OS

查看:219
本文介绍了致命:不是git存储库(或任何父目录):在Mac OS中为.git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用不同的方法来编译我的ArduPilot(从GitHub获取此代码)代码.

I tried a lot to compile my ArduPilot(got this code from GitHub) code using different method.

  1. 使用Eclipse
  2. 命令行

此代码是用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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆