【问题标题】:Two different project in one git repo一个 git repo 中有两个不同的项目
【发布时间】:2013-08-20 12:26:55
【问题描述】:

我对 GIT 还很陌生,我正在尝试弄清楚我是否可以按照以下方式进行操作,

我正在开发一个有前端和后端的应用程序。

假设前端包含位于此路径中的 10 个文件。

例如:

/home/front_end/file1 , /home/front_end/file2 ...... /home/front_end/file10

而后端包含 100 个位于不同路径的文件。

例如:

/home/app/code/file1, /home/app/code/file2 ,................./home/app/code/file99

如何创建具有两个不同位置的存储库?

【问题讨论】:

    标签: linux git github repository


    【解决方案1】:

    你真的不能。

    你可以做的是:

    • 在任何你想要的地方设置一个仓库,其中包含“front_end”和“app_code”文件夹
    • 符号链接 /home/font_end 到 yourRepo/front_end
      (如ln -s /path/to/yourRepo/font_end /home/front_end)
    • 符号链接 /home/app/code 到 yourRepo/app_code
      (如ln -s /path/to/yourRepo/app_code /home/app/code)

    【讨论】:

      猜你喜欢
      • 2010-11-20
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-08
      相关资源
      最近更新 更多