本文介绍了如何解开git仓库的所有对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解开包文件的所有对象?



我刚刚克隆了一个远程存储库,所以我的本地存储库当前不包含任何松散对象,只包含.pack和.idx文件。



我试着运行

您需要将包对象移动到之外。 git / objects / pack 目录,然后再使用该命令。然而,pack文件需要放在版本库中。



例如,在你的目录中创建一个目录名 SAMPLE 项目的根源。然后,将包文件移动到 SAMPLE 目录。之后,在没有包文件的存储库中,使用命令 git unpack-objects< SAMPLE / *。包。 Git会在你的仓库的 .git / objects 目录中生成所有对象。


How can I unpack all objects of a pack file?

I've just cloned a remote repository, so my local repository currently doesn't contain any loose object, only a .pack and a .idx files.

I've tried running git unpack-objects < .git/objects/pack/pack-.pack, but nothing happens.

I'm doing something wrong? Is there any other command to do that?

解决方案

You need to move the pack objects outside the .git/objects/pack directory before using the command. However, the pack files need to be inside the repository.

For example, create a directory name SAMPLE in your project's root. Then, move the pack files to SAMPLE directory. After that, inside the repository without the pack files, use the command git unpack-objects < SAMPLE/*.pack. Git will generate all objects inside .git/objects directory of your repository.

这篇关于如何解开git仓库的所有对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-10 21:47