Git拉动两个本地存储库之间的变化 [英] Git pulling changes between two local repositories

查看:114
本文介绍了Git拉动两个本地存储库之间的变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个同一个远程仓库的克隆。我对一个本地仓库做了一些修改,我怎样才能把这个改变拖到其他本地仓库而不需要推送到远程。

I have two clones of same remote repository.I have made some changes to one local repository, how can I pull this changes to other local repository without pushing it to remote.

推荐答案

您可以像处理另一个系统上的远程存储库一样对待第二个克隆。您可以执行所有相同的操作,例如

You can treat the second clone the same way you treat a remote respository on another system. You can perform all of the same operations, e.g.

~/repo1 $ git remote add repo2 ~/repo2
~/repo1 $ git fetch repo2
~/repo1 $ git merge repo2/foo

这篇关于Git拉动两个本地存储库之间的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆