git pull 或者执行一些其他git操作 Auto packing the repository for optimum performance. You may also run "git gc
2016-10-24 10:30
501 查看
有时候当你运行一些git命令(比如git pull)的时候,会有如下提示:
翻译:
当有这个提示的时候,直接运行 ’ git gc ‘,就可以了。
我们可以运行 ’ find .git/objects -type f ’ 命令,查看一下 objects 目录里有多少对象,如下:
然后在运行 ’ git gc ’ 命令后,在执行刚才的命令,看下 object 目录里面还剩下多少对象,如下:
Auto packing the repository for optimum performance. You may also run "git gc" manually. See "git help gc" for more information.
翻译:
自动包装最佳性能的存储库。 你也可以手动运行 ‘get gc’ 。有关更多信息,请参见“git帮助gc”。
当有这个提示的时候,直接运行 ’ git gc ‘,就可以了。
原因:
Git 往磁盘保存对象时默认使用的格式叫松散对象 (loose object) 格式。Git 时不时地将这些对象打包至一个叫 packfile 的二进制文件以节省空间并提高效率。当仓库中有太多的松散对象则就会提示你运行 ’ git gc ‘。我们可以运行 ’ find .git/objects -type f ’ 命令,查看一下 objects 目录里有多少对象,如下:
$ find .git/objects -type f .git/objects/07/0cc4950ddcd2595a8134d8e560aef2a733e581 .git/objects/13/93d47387301d83214a34883f182cacb717762c .git/objects/1c/1962af2351551af106a46a2bf43543a8bacf52 .git/objects/1c/4c0087a2c81ae4d1a521eddcecbbedc5c90270 .git/objects/36/39f696bdc97385fefb67926cdc0895e3dc5bb3 .git/objects/48/ec12b8a1a0d53d49e80156cfe969e438384da1 .git/objects/52/65597ee5edea6bc415506f097ebe072ef79363 .git/objects/52/86195cdb9c73333e06fb755272030105c50ef3 ... .git/objects/pack/pack-0c73db178d8a396a3ab624b4acf9dda479593691.idx .git/objects/pack/pack-0c73db178d8a396a3ab624b4acf9dda479593691.pack .git/objects/pack/pack-7c6c1af87ebb721211b490eec0ee6d5b49b5b280.idx .git/objects/pack/pack-7c6c1af87ebb721211b490eec0ee6d5b49b5b280.pack
然后在运行 ’ git gc ’ 命令后,在执行刚才的命令,看下 object 目录里面还剩下多少对象,如下:
$ git gc Counting objects: 11099, done. Delta compression using up to 4 threads. Compressing objects: 100% (3219/3219), done. Writing objects: 100% (11099/11099), done. Total 11099 (delta 7805), reused 10988 (delta 7712) userName@DST56034 /D/gitProject(master) $ find .git/objects -type f .git/objects/info/packs .git/objects/pack/pack-1ddf288322e0efcb6ca533b685b707ef269ff8f0.idx .git/objects/pack/pack-1ddf288322e0efcb6ca533b685b707ef269ff8f0.pack
相关文章推荐
- git操作提示 Auto packing the repository for optimum performance. You may also run "git gc" manually
- git操作提示 Auto packing the repository for optimum performance. You may also run "git gc" manually. See
- git pull时提示:Auto packing the repository for optimum performance. You may also run "git gc" manually.
- git提示Auto packing the repository in background for optimum performance
- Auto packing the repository in background for optimum performance
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- git pull出错fatal:Please make sure you have the correct access rights.and the repository exists.
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct acces
- linux下,每次git pull 或者git push都需要输入账号密码的问题以及git remote 的一些基本操作
- Git"Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct access rights.and the repository exists.
- 单击按钮或执行一些其他操作会导致回发
- git 报错 gitThere is no tracking information for the current branch. Please specify which branch you w
- “did you run git update-server-info” error on a Github repository
- did you run git # update-server-info on the server?
- 解决Git报错:The current branch is not configured for pull No value for key branch.master.merge found in configuration
- 使用在控制器中的方法上添加注解的方式来对添加注解的方法执行前做一些预处理操作或者后处理操作