Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 使用应用于每个分支的更改镜像存储库_Git - Fatal编程技术网

Git 使用应用于每个分支的更改镜像存储库

Git 使用应用于每个分支的更改镜像存储库,git,Git,我有一个存储库,它是另一个存储库的分支。(不是GitHub意义上的;存储库不是以这种方式链接的。)我继续在master分支中进行开发,但为了方便起见,我使用upstream/前缀镜像上游项目的分支,如下所示: git remote add upstream ... git fetch --prune upstream git push --prune origin \ '+refs/remotes/upstream/*:refs/heads/upstream/*' \ '+ref

我有一个存储库,它是另一个存储库的分支。(不是GitHub意义上的;存储库不是以这种方式链接的。)我继续在
master
分支中进行开发,但为了方便起见,我使用
upstream/
前缀镜像上游项目的分支,如下所示:

git remote add upstream ...
git fetch --prune upstream
git push --prune origin \
    '+refs/remotes/upstream/*:refs/heads/upstream/*' \
    '+refs/tags/*:refs/tags/upstream/*'
这很有效

此后,我为持续集成服务添加了配置文件。但是,由于这些配置文件不在
上游/
分支中,因此在将更改推送到这些分支时不会触发CI

更改镜像脚本以将配置文件添加到每个
上游/
分支是否有意义?我如何才能最好地实现这一点

理想情况下,我希望这样做,即可以很容易地将更改从
上游/master
拉到
master
。我认为,如果我只是在每个分支的顶部添加一个commit,那么它就会妨碍我这样做