1

I don't know how, but I somehow turned a file into a submodule. So now I can't view it in Github. How do I undo this, to make the file clickable again?

(I've read through answers to similar question in stackoverflow, and they don't make much sense to me...I'm pretty new to git)

JEP
  • 39
  • 1
  • 6

1 Answers1

0

You either need to revert to a past commit where that file was not a submodule:

git log path/to/file
git checkout <past_commit> -- path/to/file

Or you could delete that entry and restore the file, adding it and committing it again.

git rm -- path/to/file
# copy the file
git add -- path/to/file
git commit -m "restore file"
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250