Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal: Not a git repository (or any of the parent directories): .git in Mac OS

Tags:

github

arduino

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

  1. using Eclipse
  2. command line

This code is written in C++ language.

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

I am doing work in Mac OS so how can I avoid that error message?

like image 806
Dolat Singh Avatar asked Jan 28 '26 16:01

Dolat Singh


1 Answers

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/

The .git/ folder include git data/metadata representing your git repo.
The parent folder is the working tree of the repo.

If you don't have a .git/ folder in "myrepo", type git init .

like image 129
VonC Avatar answered Jan 31 '26 03:01

VonC