I have a remote Git repository with approx. the following repository structure:
service1/
service1/image1/
service1/image1/docker/
service1/image1/docker/Dockerfile
service2/
service2/image2/
service2/iamge2/docker/
service2/image2/docker/Dockerfile
I can clone it from https://<my-git-server>/my-project.git
to obtain a directory my-project/
and a corresponding file structure underneath it.
My service2
is a Tomcat server that hosts a webapp whose source code I would like to push into the same remote repository next.
Eclipse's file structure inside the project folder is approx. as follows (as is normal for Dynamic Web Projects in Eclipse):
my-project/WebContent/
my-project/build/
my-project/src/
If possible, I would like to arrive at a new repository structure for the remote Git repository as follows:
service1/
service1/image1/docker/
service1/image1/docker/Dockerfile
service2/
service2/image2/
service2/image2/docker/
service2/image2/docker/Dockerfile
service2/image2/eclipse/
service2/image2/eclipse/my-project/
service2/image2/eclipse/my-project/WebContent/
service2/image2/eclipse/my-project/build/
service2/image2/eclipse/my-project/src/
My question is: how I can specify the additional path component eclipse/myproject
? I understand that pushing from Eclipse to https://<my-git-server>/my-project.git
would result in WebContent
, build
and src
becoming siblings of service1
and service2
, and that pushing from Eclipse to https://<my-git-server>/my-project.git/service2/image2/eclipse/my-project
would not work either.
So how does one accomplish such a thing?