让我们看看它是什么
- 创建两个 git repo
sub
&test
mkdir 测试子 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 ..
- 将
sub
回购移动到test
mv 子测试 光盘测试 git添加子 git commit -m "添加子目录"
我想把它们当作一个 git repo 并远程推送它们,但是现在目录下的文件sub
不能被包含?
如何以简单的方式实现这一点,例如将 sub 视为普通目录?
用例
我尝试JENKINS_HOME
使用演示将我的 jenkins 数据文件夹 () 添加到 docker 图像中Dockerfile
。( ADD JEKINS_HOME /opt/jenkins
)
JENKINS_HOME
Dockerfile
我的 jenkin 有scriptler 插件,其中包含 git repo 用于其目的。然后它存在于我的 docker image git repo 中,如下所示
$ 找到詹金斯码头工人 ./.git ./.git/..(跳过 ./Dockerfile ./JENKINS_HOME ./JENKINS_HOME/scriptler ./JENKINS_HOME/scriptler/scripts ./JENKINS_HOME/scriptler/scripts/.git ./JENKINS_HOME/scriptler/scripts/.git/...(跳过) ./JENKINS_HOME/scriptler/scripts/Sample.groovy ./JENKINS_HOME/...(跳过) ./自述文件