本文介绍了当我在GitHub上移动回购时,如何转发旧的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将个人账户中的回购资料移至组织,因为越来越多的人参与该项目。但是,如果人们拥有旧网址,我希望他们能够轻松找到新的位置。我怎么能做到这一点?

I moved my repo from a personal account to an organization, as more people are getting involved in the project. But if people have the old URL, I want them to be able to find the new location easily. How can I make that happen?

我知道GitHub不支持转发。我想用旧的名字创建一个简单的回购协议,其中一个指向新位置的 README.md ,但我想知道这是否会给任何分叉的人带来麻烦位置?

I know that GitHub doesn't support forwarding. I thought of creating a trivial repo at the old name, with a README.md pointing to the new location, but I wonder if that will create trouble for anyone who forked the old location?

推荐答案

如果SHA1在您移动的回购库中保持不变,那么他们可以再次分叉,并查看他们是否可以继续将他们的提交从现有的本地克隆推送到他们的新分支(通过简单地删除他们的旧分支并再次分叉:如果名称没有改变,他们甚至不需要用 git remote set-url

If the SHA1 are unchanged in your moved repo, they can simply fork again, and see if they can go on pushing their commit from their existing local clone to their new fork (by simply deleting their old fork and forking again: if the name is unchanged, they wouldn't even have to change the remote url for their fork with a git remote set-url)

但是如果SHA1不同,那么分叉旧位置的人将不得不报告他们的本地提交到新的本地回购,这将是新组织回购的新分支的克隆。

But if the SHA1 differs, then the people who forked the old location is will have to report their local commits onto a new local repo, which will be the clone of a new fork from the new organization repo.

这篇关于当我在GitHub上移动回购时,如何转发旧的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 02:22