简体   繁体   English

如何在2个不同的帐户上同步2个git存储库?

[英]How to sync 2 git repositories on 2 different account?

I have a situation that I have a main git repository in one bitbucket account and another repository into another account. 我有一种情况,我在一个bitbucket帐户中有一个主要的git存储库,而在另一个帐户中有另一个存储库。 One is the repository that we use daily and the other is the client repository that I need to update on a weekly basis. 一个是我们每天使用的存储库,另一个是我需要每周更新的客户端存储库。 How can I do that transfering all the versions of the files? 如何传输文件的所有版本? Any way to have a build on jenkins to do it? 有什么办法可以在詹金斯身上建立基础吗?

Regards 问候

Use git remote branching strategy to merge it before you start Jenkins build to have it. 在开始Jenkins构建之前,请使用git远程分支策略对其进行合并。 https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches https://git-scm.com/book/zh/v2/Git-Branching-Remote-Branches

You can push the changes to the second repo but using diff remote name. 您可以使用diff远程名称将更改推送到第二个存储库。
Eg: 例如:
git push alias_for_repo1 branch_name git push alias_for_repo1分支名称
git push alias_for_repo2 branch_name git push alias_for_repo2分支名称

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM