What does "Auto Packing the Repository for Optimum performance" mean?

Asked

Viewed 459 times

6

I went to give git push in a remote repository and the following message appeared:

Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.

I immediately interrupted because I thought I wrote a wrong command. In Soen it says that this occurs by the large number of unpackaged loose objects.

What exactly is this? Is there any problem in interrupting this process or is it necessary to do?

2 answers

4


The auto Packing serves for GIT to recreate the internal indexes of the files (no commit or file is modified). It is an internal procedure that will expedite display of logs, tasks of push/pull, etc..

Already the git gc is the Garbage Collector GIT, that is, it collects all the garbage in the repository. Copied from the manual:

git gc tries very hard to be safe about the Garbage it collects.

The git gc is very cautious in what it removes from the repository, collaborating also to improve performance. So you can perform the procedure without fear.

That article in the GIT manual in Portuguese explains in detail how the Garbage Collector works.

2

This happens to speed up the process when Git identifies that the drive involves many files.

To make it easier, you can think about packing like Git doing a compression .zip of the files to move them, getting smaller and lighter, and in turn thinking about the git gc as the action to decompress the files.

(this was an example for understanding, does not mean that it generates a file .zip)

If you want more detailed information: Git Internals

Browser other questions tagged

You are not signed in. Login or sign up in order to post.