将用户 2 的所有工作合并到 Git 上的用户 1 中



几年前,我使用 git 帮助开发了一个 lil' Web 应用程序项目(在本地开发机器 LAMP 上)。我是user1,但user2当时编写了大部分(如果不是全部)实际代码。我现在正在恢复该项目并执行所有编码职责。如何将user2的所有工作(/home/users/user2/projectfoo.git)合并到user1的工作(home/users/user1/projectfoo.git)中,从而带来所有文件,文件夹,钩子,提交历史记录和注释?

下面添加 git 远程存储库

git remote add user2_repo user2@localhost:path/to/repository.git

使用 从存储库拉取到本地

git pull user2_repo branchname

这使您可以提取所有更改并提交到存储库。

最新更新