0

I got a github project based with submodules included in. I have local file (I mean a certain modified version of a submodule) But when I push I can't be able to keep my local file unchanged in gitkracken, even by use the git program on linux.

How to commit my actual files and forget about submodule checks?

Izio
  • 378
  • 6
  • 15
  • Can you add the commands and their output to the question? – evolutionxbox Jun 25 '18 at 21:25
  • When I add files : git add -all it add the submodule and not the files then I do git commit -m "test" then git push ... and i only can see a weird folder on github with no content, no access... And weirdly have the file locally – Izio Jun 25 '18 at 21:38
  • 1
    (please add the commands to the question) – evolutionxbox Jun 25 '18 at 21:45

1 Answers1

0

and i only can see a weird folder on github with no content, no access.

That is a gitlink, a reference to the SHA1 of your submodule.

If you really don't want the submodule history, but directly its files within your repo, you need to delete that gitlink, while keeping its files: see "remove git submodule but keep files".

mv subfolder subfolder_tmp
git submodule deinit subfolder
git rm --cached subfolder
mv subfolder_tmp subfolder
git add subfolder
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250