How to transfer a github Projects from one repository to another
Asked Answered
R

2

18

I am curious if you can move a github 'Project' from one repository to another.

Should be more specific. Github has a 'Project' feature that allows you to create a simple kanban board. enter image description here

I would like to move this project from repo-a to repo-b. Looking through the UI I do not see a way to do this.

Runagate answered 18/9, 2019 at 2:41 Comment(1)
What are your expectations about the issues in the repo-a? They don't belong to repo-b; do you want the Project on repo-b with kanbans for issues of repo-a? Or otherwise?Metal
M
2

A single GitHub Project can span multiple repositories, so your best bet is to add the new repository and remove the old one.

Unfortunately, the Kanbans refer the specific GitHub issues inside a specific repository: so if you remove the source repo, you'll loose also the related issues from the Project.

In case you want to keep you old issues on the new repository, your best bet is to:

  • transfer the issues from repo-a to repo-b (Select issue -> Transfer Issue -> Choose Repository)
  • if you want, try the "Make a copy", option under the Project's ᐧ ᐧ ᐧ button
  • go to repo-b's issues, select them all, click the _"Projects" dropdown and choose your own Project.
    • you'll see a spinner icon; wait till it's done and you get a green confirmation.
    • now all the selected issues should be present inside you project.
      Although you can't get automatically the cards back to where they were in repo-a.
      You will need to redistribute them manually.
Metal answered 13/6, 2023 at 20:37 Comment(3)
The original question doesn't say anything about deleting a repo or migrating issues. It is asking about the UIPreadamite
I am talking about the UI and about what's currently possible: Projects are organization- or user-wise, not repo-wise, so Kanbans can reference different repos, as you also answered. – Still, to me looks like OP wants to move over also the created Kanban board "Purple-Daily-Jobs"; there's no UI option to move also the Kanban content with its issues (because issues belogn to repo-a). I suggested to just to switch one repo with another, in the Project; not to delete any repository.Metal
Actually I figured out a way! Updated my answer.Metal
P
3

Im not sure if this is how it was 3 years ago, but inside of the projects page there is now a button to "Link a Project":

enter image description here

As projects can span multiple repos, you can just link the project to however many repos you want to be contained inside of it.

Preadamite answered 13/6, 2023 at 20:51 Comment(0)
M
2

A single GitHub Project can span multiple repositories, so your best bet is to add the new repository and remove the old one.

Unfortunately, the Kanbans refer the specific GitHub issues inside a specific repository: so if you remove the source repo, you'll loose also the related issues from the Project.

In case you want to keep you old issues on the new repository, your best bet is to:

  • transfer the issues from repo-a to repo-b (Select issue -> Transfer Issue -> Choose Repository)
  • if you want, try the "Make a copy", option under the Project's ᐧ ᐧ ᐧ button
  • go to repo-b's issues, select them all, click the _"Projects" dropdown and choose your own Project.
    • you'll see a spinner icon; wait till it's done and you get a green confirmation.
    • now all the selected issues should be present inside you project.
      Although you can't get automatically the cards back to where they were in repo-a.
      You will need to redistribute them manually.
Metal answered 13/6, 2023 at 20:37 Comment(3)
The original question doesn't say anything about deleting a repo or migrating issues. It is asking about the UIPreadamite
I am talking about the UI and about what's currently possible: Projects are organization- or user-wise, not repo-wise, so Kanbans can reference different repos, as you also answered. – Still, to me looks like OP wants to move over also the created Kanban board "Purple-Daily-Jobs"; there's no UI option to move also the Kanban content with its issues (because issues belogn to repo-a). I suggested to just to switch one repo with another, in the Project; not to delete any repository.Metal
Actually I figured out a way! Updated my answer.Metal

© 2022 - 2024 — McMap. All rights reserved.