简体   繁体   English

在GitHub上归档git库的最佳方法是什么?

[英]What is the best way to archive git libraries on GitHub?

I feel like I have a lot of libraries on my GitHub that clutter it up, and they would be great to remove or hide, but at the same time I don't want to delete them forever. 我觉得我的GitHub上有很多库使它们杂乱无章,可以很好地删除或隐藏它们,但是与此同时,我不想永远删除它们。 What have other people done to sort of "archive" their libraries so they don't show up on GitHub but are retrieval later? 其他人做了些什么来“归档”他们的库,这样它们就不会出现在GitHub上,但稍后会被检索?

Ideally, you would store those libraries in an artifact repository like Nexus , in order to declare and record their exact versions in a pom.xml file (which you can version in your GitHub repository) 理想情况下,您可以将这些库存储在Nexus之类工件存储库中 ,以便在pom.xml文件中声明和记录其确切版本(您可以在GitHub存储库中对其进行版本控制)

In other word, you wouldn't store your libraries directly in source control, you would only store the declaration of said libraries. 换句话说,您不会将库直接存储在源代码管理中,而只会存储所述库的声明

Clone your repository with git clone and delete it from Github. 使用git clone克隆您的存储库,并将其从Github中删除。 The clone is an exact copy containing the entire history. 克隆是包含整个历史记录的精确副本。 Back it up however you would choose to back up any other data. 备份它,但是您将选择备份任何其他数据。 Zip it, burn it to disc or store it in the cloud with your favourite backup service. 将其压缩,刻录到光盘或使用您喜欢的备份服务将其存储在云中。 You can include the wiki by enabling Git access and cloning it as well. 您可以通过启用Git访问并克隆它来包含Wiki。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM