Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github usage : delete and recreate a fork?

Tags:

github

I did contribute to a github project.

  • I forked the project
  • Did my stuff
  • Asked for a pull request that was accepted.
  • Now, my branch is perfectly in sync with the master project. Nice.

I dont' want anyone to fork from my version on github, but I prefer them to feed themselves from the original project. So I want to delete my "master branch" which represent a "Delete repository" operation....

My question is: If I delete it, and one day I would like to contribute again to the same project, will I get some strange behaviors on a "re-fork" ? Will I loose some information like issues etc... ?

Does anyone with extensive experience on github can hint me ont that ?

like image 539
NoNameStackExchange Avatar asked Dec 16 '17 21:12

NoNameStackExchange


People also ask

Can I delete a fork and recreate?

As mentioned here, as long as your PR (Pull Requests) are accepted, you can delete your fork. Or you can delete it even if your PR is pending... but it would then disappear along with your fork (it would still be visible in the upstream original repo though).

Does deleting a forked repository delete the original?

Also note that if you are deleting a forked repository, deleting it will only remove it (including any changes you have made to it) from your own GitHub - you won't accidentally delete the original project (phew).

What happens to a forked repo if the original is deleted?

If the original repository is deleted, the fork remains. The question is about GitHub!


1 Answers

You can delete your fork actually (not just the master branch)

Once deleted, you will be able (as seen here) to re-fork the original project at any time.
As mentioned here, as long as your PR (Pull Requests) are accepted, you can delete your fork. Or you can delete it even if your PR is pending... but it would then disappear along with your fork (it would still be visible in the upstream original repo though).

Official documentation: "Tidying up after Pull Requests" (for branches only, but you can apply the same idea to fork deletion).

like image 196
VonC Avatar answered Sep 24 '22 03:09

VonC