0

也许这看起来有点像一个愚蠢的问题,但是我的一个朋友有两个存储库,他需要将文件从每个存储库中推拉到另一个存储库。有没有办法用 git 做到这一点?

4

2 回答 2

0

You cannot push "files", you can only push commits.

You can have a local repository with two remotes defined. Then you can pull from the one repository and push to the other.

But at the end you can only checkout a single commit, i.e. if both repositories are completely unrelated it is probably no good idea.

You should really think about what you want to achieve and why, before thinking about the how.

于 2013-03-14T23:24:32.227 回答
0

如果两个存储库位于同一个系统中,那么它没有任何意义,因为只能使用一个存储库。如果您将其中一个用作远程位置,那么 IDE(NetBeans 或 Eclipse)将提供从这些存储库中拉取或推送到这些存储库的选项。

于 2013-03-14T19:39:31.930 回答