DEV Community

Muthu
Muthu

Posted on

7 2

[FIXED] fatal: this operation must be run in a work tree

This error may happened due to the mis-configuration of the git as bare. So, the following command will remove/unset the bare setup

git config --unset core.bare
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
ngdangtu profile image
Đăng Tú • Edited

In my case, I was mistakenly to execute git commands in .git dir. The solution was pretty embarrassing silly :)) . Just cd out of it and execute the command again :))

Collapse
 
ayushaustin profile image
AYUSH RAJ

its not working for window 10 (11.06.2020)

Image of Timescale

PostgreSQL for Agentic AI — Build Autonomous Apps on One Stack ☝️

pgai turns PostgreSQL into an AI-native database for building RAG pipelines and intelligent agents. Run vector search, embeddings, and LLMs—all in SQL

Build Today

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay