简体   繁体   English

为 bitbucket git 存储库创建别名

[英]Creating an alias for a bitbucket git repository

Got a Bitbucket git repository which has out-grown its original scope so that the repo name no longer represent the content.有一个 Bitbucket git 存储库,它已经超出了其原始范围,因此存储库名称不再代表内容。

Can I create an 'alias repository' which will point to the existing one, but with a better name, while keeping the old name working to avoid updating existing checkouts, CI systems, etc.?我可以创建一个“别名存储库”来指向现有的存储库,但使用更好的名称,同时保留旧名称以避免更新现有的检出、CI 系统等吗?

I vision here two repo names, but a single repo state which is available under both names.我在这里设想了两个 repo 名称,但是在两个名称下都可以使用一个 repo state。

You can try and:您可以尝试:

  • clone the repo克隆回购
  • rename your current BitBucket repo重命名您当前的 BitBucket 存储库
  • create a new one, re-using the name of the original repo创建一个新的,重新使用原始 repo 的名称
  • reset your local clone to the right SHA1 (loosing the part of the recent history that does not interest you)将您的本地克隆重置为正确的 SHA1(丢失最近历史记录中您不感兴趣的部分)
  • pushing the local repo to the newly created one.将本地仓库推送到新创建的仓库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM