Let's see what it is
- Create two git repo
sub and test
mkdir test sub
cd test && git init && touch README && git add README && git commit -m "initialize the git repo" && cd ..
cd sub && git init && touch README && git add README && git commit -m "initialize the sub git repo" && cd ..
- Move
sub repository to test
mv sub test
cd test
git add sub
git commit -m "add sub directory"
I want to treat them as one git repository and delete them remotely, but now the files in the sub directory cannot be included?
How can I achieve this in a simple way, how to handle sub as a regular directory?
Use for this
I am trying to add jenkins data folder ( JENKINS_HOME ) to JENKINS_HOME images using Dockerfile for demonstration. ( ADD JEKINS_HOME /opt/jenkins )
JENKINS_HOME Dockerfile
My jenkin has a scriptler plugin that contains a git repository for its purpose. Then it exists in my docker git repo image as below
$ find jenkins-docker
./.git
./.git/ .. (skipped
./Dockerfile
./JENKINS_HOME
./JENKINS_HOME/scriptler
./JENKINS_HOME/scriptler/scripts
./JENKINS_HOME/scriptler/scripts/.git
./JENKINS_HOME/scriptler/scripts/.git / ... (skipped)
./JENKINS_HOME/scriptler/scripts/Sample.groovy
./JENKINS_HOME / ... (skipped)
./README
source share