如何从 GitHub 数据导出中获取源代码?
How to get source code from GitHub data export?
我决定备份我所有的 github 数据并发现:https://help.github.com/en/github/understanding-how-github-uses-and-protects-your-data/requesting-an-archive-of-your-personal-accounts-data
我设法获得了 .tar.gz
文件,它似乎包含我所有的存储库,但其中没有源代码。从大小来看,它看起来像是 objects/pack/*.pack
中的某种存档
有什么方法可以访问原始源代码吗?
it looks like some kind of archive in objects/pack/*.pack
根据Download a user migration archive:
The archive will also contain an attachments directory that includes all attachment files uploaded to GitHub.com and a repositories
directory that contains the repository's Git data.
那些可能是 bare repositories or bundles.
解压缩后,尝试 git clone
这些文件夹之一(到新的空文件夹)
OP johnymachine confirms :
git clone .\repositories\username\repository.git\ .\repository\
意思是 repository.git
是一个裸仓库(Git 仅数据库,没有签出文件)
我决定备份我所有的 github 数据并发现:https://help.github.com/en/github/understanding-how-github-uses-and-protects-your-data/requesting-an-archive-of-your-personal-accounts-data
我设法获得了 .tar.gz
文件,它似乎包含我所有的存储库,但其中没有源代码。从大小来看,它看起来像是 objects/pack/*.pack
有什么方法可以访问原始源代码吗?
it looks like some kind of archive in objects/pack/*.pack
根据Download a user migration archive:
The archive will also contain an attachments directory that includes all attachment files uploaded to GitHub.com and a
repositories
directory that contains the repository's Git data.
那些可能是 bare repositories or bundles.
解压缩后,尝试 git clone
这些文件夹之一(到新的空文件夹)
OP johnymachine confirms
git clone .\repositories\username\repository.git\ .\repository\
意思是 repository.git
是一个裸仓库(Git 仅数据库,没有签出文件)