eclipse - 将同一个项目推送到两个不同的 Git 存储库

标签 eclipse git

根据客户的要求,我的项目需要放置在两个不同的 git 存储库中。有什么方法可以通过 eclipse 或命令行来做到这一点吗? 谢谢。

最佳答案

您可以在实际 Remote 上添加另一个 Remote 。因此,您将拥有一个“origin”(通常是您使用的名称)和一个 originClient

git remote add originClient <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bddad4c9fddad4c9d5c8df93ded2d0" rel="noreferrer noopener nofollow">[email protected]</a>:User/UserRepo.git

git push -u originClient yourBranchName

关于eclipse - 将同一个项目推送到两个不同的 Git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52331786/

相关文章:

php - 我可以向 Android Studio 中的现有项目添加新包吗?

javascript - Eclipse 中的 JSDoc 自动完成文档不适用于 Class.create()

git - 如何撤消未提交更改的 git checkout 文件?

git - 压缩git中分支中的所有提交

eclipse - tomcat不解压war文件

java - 在 AlgoTrader 中运行 SimulationStarter 类

eclipse - spring boot 使用 springloaded 在 gradle 中没有工作

一个分支的 Git diff,不包括其他分支的提交

git - 将公共(public) git 存储库集成到私有(private)项目中(没有子模块或子树 merge )

git - 在 git post-commit Hook 中,如何获取已更改文件的列表?