0

I'm stuck in "Detached HEAD" on git. I got there by reverting back to a previous commit. And now that I've made changes, I'd like tried to commit them but realised I couldn't because I'm in the detactched head thing.

I've tried using git checkout main but that gives me fatal: this operation must be run in a work tree. And I can't seem to find a working solution for that either. Any ideas?

Matt Cole
  • 21
  • 1
  • 2

0 Answers0