0

Lets assume that I extracted a sub folder "public" to a new repository "my_public_repository". Now I want to replace the public folder in the original project with the content of the new submodule (= I want to keep the original folder structure but change the origin).

I tried git submodule add https://github.com/user/my_public_repository.

Instead of the wanted folder strurcture

project
  + public

I got

project
  + my_public_repository
    + public

I tried to specify the target directory for git submodule add as the current directory with . or /. However, that did not work.

=> How can I directly add the content of the submodule, without extra folder for the project name?

Related question:

How to sync a public subfolder of one repository with another repository?

Stefan
  • 10,010
  • 7
  • 61
  • 117

1 Answers1

0

Worked around the issue, by not pushing the whole public folder but only its content to the new repository.

Stefan
  • 10,010
  • 7
  • 61
  • 117