Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Transferring a repository" could mention something about forking back after transfering #13044

Open
1 task done
bjorn opened this issue Dec 16, 2021 · 7 comments
Open
1 task done
Labels
content help wanted

Comments

@bjorn
Copy link

@bjorn bjorn commented Dec 16, 2021

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository

What part(s) of the article would you like to see updated?

I've already transferred a repository. The documentation states "All links to the previous repository location are automatically redirected to the new location.", which is working great. However, now I would like to know if I can create a fork back to the original account, without destroying those redirects.

Intuitively I would think, that the redirects will be lost entirely, when I would simply fork the repository, but it would be helpful if the docs could confirm this.

As a workaround to this, I am thinking about forking to a temporary account first, then renaming the repository (since it doesn't seem possible to rename while forking), and then transferring the renamed repository to the original account. Before I do this I would like to be sure that the redirects will keep working for the original name, and I think similarly it would be helpful if the docs could include some information about this.

Additional information

No response

@bjorn bjorn added the content label Dec 16, 2021
@welcome
Copy link

@welcome welcome bot commented Dec 16, 2021

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage label Dec 16, 2021
@github-actions github-actions bot added this to Triage in Docs open source board Dec 16, 2021
@ramyaparimi ramyaparimi added waiting for review and removed triage labels Dec 16, 2021
@ramyaparimi
Copy link
Contributor

@ramyaparimi ramyaparimi commented Dec 16, 2021

@bjorn
Thanks so much for opening an issue! I'll triage this for the team to take a look 👀

@lecoursen
Copy link
Member

@lecoursen lecoursen commented Feb 15, 2022

Hi @bjorn! These are great questions. Could you please reach out to the Community Forum to find out the answers? We'd then be happy to document that information. I'll close this issue for now, but feel free to re-open once we have that information to act on.

Docs open source board automation moved this from Triage to Done Feb 15, 2022
@janiceilene janiceilene moved this from Weeks 1 - 3 to Weeks 7-9 in MLH Fellowship Feb 22, 2022
@janiceilene janiceilene moved this from Weeks 7-9 to Done in MLH Fellowship Feb 22, 2022
@bjorn
Copy link
Author

@bjorn bjorn commented Mar 30, 2022

Hi @bjorn! These are great questions. Could you please reach out to the Community Forum to find out the answers? We'd then be happy to document that information.

Rather than starting another topic, I've decided to just give it a try. I did the following:

  • (Transfer the repository bjorn/tiled to mapeditor/tiled, which created redirects)
  • Fork mapeditor/tiled to mana/tiled
  • Rename the mana/tiled repository to mana/tiled-dev
  • Transfer the repository to bjorn/tiled-dev

And I was glad to see, that this way, the redirects from bjorn/tiled to mapeditor/tiled remained intact!

Since there is no way to rename while forking, and forking back with the same name would replace the redirects, I think it would be worthwhile to add a section about these steps to the documentation.

@lecoursen lecoursen reopened this Mar 30, 2022
@lecoursen lecoursen added the triage label Mar 30, 2022
@ramyaparimi ramyaparimi added waiting for review and removed triage waiting for review labels Mar 30, 2022
@github-actions github-actions bot added stale and removed stale labels May 29, 2022
@stevecat
Copy link
Member

@stevecat stevecat commented May 31, 2022

Hi @bjorn 👋 Thanks for following up. I agree it would be helpful to provide some more information about redirects. Rather than explaining the very specific case of forking back after transferring, let's instead explain that:

  • Redirects will function until a new repository or fork with the same name is created.
  • Renaming or deleting the repository or fork will reinstate the redirect.

I think the best place to mention that would be in this bullet point, beneath the codeblock demonstrating how to update a remote:

https://github.com/github/docs/blob/main/content/repositories/creating-and-managing-repositories/transferring-a-repository.md?plain=1#L48-L53

Be careful to keep the indentation so the new information is contained in the same bullet point.

You or anyone else is welcome to open a PR to address this! 🎉

@bjorn
Copy link
Author

@bjorn bjorn commented May 31, 2022

  • Renaming or deleting the repository or fork will reinstate the redirect.

Do you mean that, when a repo was previously moved from a/foo to b/foo, then forked back to a/foo, disabling the redirect, and then renamed to a/bar, will reinstate the redirect from a/foo to b/foo, rather than setting up a new redirect from a/foo to a/bar?

@stevecat
Copy link
Member

@stevecat stevecat commented Jun 7, 2022

@bjorn That's right. The redirect is created when the repository is moved. The redirect isn't deleted but it can be overridden. When you visit a/foo, the site will first check for a repository/fork with that name and when it can't find one, it will check for redirects.

In your example, once a/foo is renamed to a/bar, the redirect starts working again. I hope that's helpful!

@cmwilson21 cmwilson21 added help wanted and removed waiting for review labels Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content help wanted
Development

No branches or pull requests

10 participants
@bjorn @timeyoutakeit @janiceilene @stevecat @lecoursen @ramyaparimi @cmwilson21 and others