Last answered:

17 Sept 2024

Posted on:

13 Apr 2023

0

Resolved: Error, fatal: this operation must be run in a work tree

  I'm getting this error when checking the status and adding the test file to git. please help

3 answers ( 1 marked as helpful)
Instructor
Posted on:

19 Apr 2023

0

Hi Manogna!

Thanks for reaching out.

This error message appears when you run git in a directory that is not a working tree. Make sure you are in your project directory and not inside .git when executing the add command.

Hope this helps.

Best,

Ivan

Posted on:

16 Sept 2024

0
I don't think the previous answer is helpful. I came across it in my Google search. 
I got the same error and basically what I did was to type: cd .. which took me to master...
Instructor
Posted on:

17 Sept 2024

0
Hey Segun!
Thanks for sharing this!
Best,
Ivan

Submit an answer