On archiving GitHub repositories
There are many reasons for creating a public repository on GitHub. For example, you may be speaking at a conference or meetup, love doing small side projects, or write articles and provide accompanying code. Depending on the popularity of the project, the repository may be active (seeing commits, receiving pull requests, …) for a long time. Others, like apps accompanying an article or talk, are somewhat short-lived, meaning that once the article or talk is finished, the repo may no longer see much activity, besides being found by searches and possibly being cloned.
So, what do you usually do with such repositories?
Chances are, nothing, leaving them unattended, that is. Depending on the repository settings, passers-by may create Pull Requests or Issues, or contribute to the Wiki, which requires some monitoring from you to make sure that nothing unwanted gets added. To prevent bad behavior, the easiest solution is to delete the repository. You can do so in the Danger Zone in the repository settings.
Deleting the repository obviously makes it unavailable to everyone (including you), so it can no longer be cloned and links to the repository no longer work.
Please don’t do that.
By deleting your repository, you undo your contribution to the community. Please don’t do that. Consider archiving it instead. If you really want or need to make your content unavailable to the public, you can change the repository visibility in the Danger Zone.
So, how does archiving a repository work? Let’s take a look.
Archiving a repository
Fortunately, it’s as simple as changing the repository visibility. Clicking on Archive this repository in the Danger Zone opens a small dialog that tells you what happens when you archive a repository.
To confirm that you have understood the consequences, you need to enter the full repository name. As for the consequences, the nice thing about archiving a repository is that you can change your mind any time.
Once a repository has been unarchived, passers-by can again interact with the repository, for example (depending on the repository settings) create Pull Requests, contribute to the Wiki, or create Issues.
Conclusion
Archiving a repository is a community-frieldy way of showing that you are no longer working on it. Others can still clone the repository, yet no outside contributions require your attention.
Here’s one more tip: when you create a repository, ask yourself which level of contribution by others you wish or appreciate. Samples, for example likely don’t need a Wiki. You can configure this in the repository settings (unless the repository has been archived). Features you may want to disable include
- Wikis
- Issues
- Sponsorships
- Discussions
- Projects
By configuring your repository upon creation you make sure that unwanted behavior is not possible from the beginning.
How do you handle your no-longer active repositories. Please share your thoughts in the Comments.