我如何组织 bitbucket CustomName/Development、CustomName/Database
How can i organize bitbucket CustomName/Development, CustomName/Database
我的 bitbucket 变得一团糟。我试图了解(w/o 太多的命令行巫术)如何组织。在其他源代码管理中我从未遇到过这个问题(svn、tfs 等)
例如,我有一个包含 3 个完全独立的存储库的项目:
1.) 开发(源代码 c#、f# 等)
2.) 数据库(脚本等源代码控制到不同的 repo)
3.) Netopsie 类型的 Aux 东西
我的大部分项目都遵循这种模式,我希望在 bitbucket 中看到的是:
ProjectName
-> Development (repo)
-> Database (repo)
-> NetOps (repo)
这是否可以使用 bitbucket 轻松完成/git?
当然:您可以使用 submodules 让您的新 ProjectName
存储库引用每个现有存储库的确切 SHA1。
这将确保当您 git clone --recursive https://bitbucket.org/<user>/ProjectName
时,您将获得三个 repos 所需的版本,以便它们协同工作(而不是它们各自 master 分支的最新版本,这可能会也可能不会与其他存储库兼容)。
如果你需要那些子模块总是更新到分支的最新版本,你也可以指定它。
无论如何,创建一个空的 BitBucket 存储库,克隆它,然后
cd /path/to/ProjectName
git submodule add -- https://bitbucket.org/<user>/Development
git submodule add -- https://bitbucket.org/<user>/Database
git submodule add -- https://bitbucket.org/<user>/NetOps
git add .
git commit -m "add 3 repos"
git push -u origin master
另请参阅:
- "git submodule tracking latest"
- "Git submodules: Specify a branch/tag"
奇怪且不幸的是,bitbucket 中不存在此功能,但是请到此处投票支持添加此功能:
https://bitbucket.org/site/master/issues/12182/repository-projects-folders-and-labels
您可以在此处查看所有提出此请求的用户:
https://bitbucket.org/site/master/issues/2323/create-a-way-to-group-repositories
我的 bitbucket 变得一团糟。我试图了解(w/o 太多的命令行巫术)如何组织。在其他源代码管理中我从未遇到过这个问题(svn、tfs 等)
例如,我有一个包含 3 个完全独立的存储库的项目: 1.) 开发(源代码 c#、f# 等) 2.) 数据库(脚本等源代码控制到不同的 repo) 3.) Netopsie 类型的 Aux 东西
我的大部分项目都遵循这种模式,我希望在 bitbucket 中看到的是:
ProjectName
-> Development (repo)
-> Database (repo)
-> NetOps (repo)
这是否可以使用 bitbucket 轻松完成/git?
当然:您可以使用 submodules 让您的新 ProjectName
存储库引用每个现有存储库的确切 SHA1。
这将确保当您 git clone --recursive https://bitbucket.org/<user>/ProjectName
时,您将获得三个 repos 所需的版本,以便它们协同工作(而不是它们各自 master 分支的最新版本,这可能会也可能不会与其他存储库兼容)。
如果你需要那些子模块总是更新到分支的最新版本,你也可以指定它。
无论如何,创建一个空的 BitBucket 存储库,克隆它,然后
cd /path/to/ProjectName
git submodule add -- https://bitbucket.org/<user>/Development
git submodule add -- https://bitbucket.org/<user>/Database
git submodule add -- https://bitbucket.org/<user>/NetOps
git add .
git commit -m "add 3 repos"
git push -u origin master
另请参阅:
- "git submodule tracking latest"
- "Git submodules: Specify a branch/tag"
奇怪且不幸的是,bitbucket 中不存在此功能,但是请到此处投票支持添加此功能:
https://bitbucket.org/site/master/issues/12182/repository-projects-folders-and-labels
您可以在此处查看所有提出此请求的用户: https://bitbucket.org/site/master/issues/2323/create-a-way-to-group-repositories