3

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?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Dolat Singh
  • 43
  • 2
  • 4
  • Please provide some code (e.g. the command line method) or links to your github repo – miga Apr 17 '16 at 11:43

1 Answers1

1

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 .

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    but now im facing some another problem. cc1plus: error: unrecognized command line option "-std=gnu++11" – Dolat Singh Apr 17 '16 at 14:51
  • @DolatSingh OK. Can you ask a separate question for that, with the exact version of git, the version of your OS (Windows, Mac, Linux; ...) and more detail about the command you type which result in that error message? – VonC Apr 17 '16 at 14:54