Can I delete a forked Github repository when upstream hasn't accepted my pull request?

StackOverflow https://stackoverflow.com/questions/21309262

  •  01-10-2022
  •  | 
  •  

Вопрос

I forked another person's repository, made some of my own commits, and then sent a pull request back to the user. The user has not been active lately, and I do not see myself contributing any more to the project.

I would still like to see my pull request accepted and merged in one day, but I do not want to keep my version of the repository sitting around anymore.

  1. Is it ok to delete the repository before my pull request gets looked at by the user?

  2. If I do delete my forked repository now, will my pull request still be applicable?

  3. Is deleting forked repositories before the pull requests gets analysed, an ok practice?

Это было полезно?

Решение

  1. Yes
  2. Yes

The pull request(PR) is unaffected when you delete your fork (see also this answer to a similar question).

  3. It depends:

Once your fork is deleted, the PR contents (commits) can no longer be updated in the same PR thread. You can fix your commit even after you have deleted (and possibly recreated) your fork, as your commit exists in the upstream repository. However, the existing PR will not update even if you create a branch of the same name in a recreated fork, so you will have to open a new PR (the requesting branch and fork are internally linked to a unique identifier; recreating a fork will generate a new identifier, so the PR remains unlinked).

So if you can expect to get feedback on the PR within a reasonable time (and if you intend to consider the feedback and fix your contribution, if necessary), you should keep your fork so you can fix your contribution, if necessary.

If you don't expect feedback or don't care about fixing your contribution, you can delete your fork right away.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top