DEV Community

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

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 :))