在Windows上,我们可以在1 Git或Mercurial(hg)存储库中放置不同的文件夹吗? [英] On Windows, can we put different folders in 1 Git or Mercurial (hg) repository?

查看:203
本文介绍了在Windows上,我们可以在1 Git或Mercurial(hg)存储库中放置不同的文件夹吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows上,我们可以在1个Git或Mercurial(hg)存储库中放置不同的文件夹吗?

On Windows, can we put different folders in 1 Git or Mercurial (hg) repository?

例如放入

Such as putting

c:\ror
c:\software projects\ruby
c:\js test
d:\peter_website

所有在1 Git或Mercurial存储库中名为 code

all in 1 Git or Mercurial repository called code ?

推荐答案

不,这不是直接可能的。你可以做的是为每个目录创建独立的存储库,然后将它们作为另一个存储库中的子模块。

No, this is not directly possible. What you could do is making seperate repositories for each dir and then combine them as submodules in another repository.

我建议只保存一个项目库。如果这三个目标是针对同一个项目的,那么您可以考虑为它们使用更好的目录结构。

I would advise to keep a repository about one project only. If these three dirs are for the same project, you might considering using a better directory structure for them.

这篇关于在Windows上,我们可以在1 Git或Mercurial(hg)存储库中放置不同的文件夹吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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