Git克隆时组合两个存储库的最佳方法

时间:2018-03-14 16:00:06

标签: git

假设我必须使用存储库rA和rB。

rA可能看起来像

 root/
   -> myfile.c
   -> foo.c
   next_folder/
      -> bar.c

rB看起来像

 root/
    -> otherfile.c
    next_folder/
        -> otherbar.c

有没有办法(也应该是我的git hook脚本的一部分)允许我在有人克隆rA时进程也从rB执行rA合并,而不将rB的文件添加到下一次提交rA(在最好的情况下:也将它们添加到gitignore)。克隆/结账后,rA应该看起来像

rA_withB

 root/
    -> myfile.c
    -> foo.c
    -> otherfile.c
    next_folder/
        -> bar.c
        -> otherbar.c

0 个答案:

没有答案
相关问题