What does "Auto packing the repository for optimum performance" mean?

4

I was giving git push to 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 says this is due to the large number of loose objects not packed .

What exactly is that? Is there a problem stopping this process or do I need to do this?

    
asked by anonymous 14.05.2015 / 15:16

2 answers

3

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

While git gc is the garbage collector of GIT, that is, it collects all the garbage in the repository. Copying the manual:

  

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

git gc is very wary of what it removes from the repository, also collaborating to improve performance. Then you can perform the procedure without fear.

# in the GIT manual in Portuguese explains in detail how the garbage collector works.

    
14.05.2015 / 16:01
2

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

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

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

For more detailed information: Git Internals

    
14.05.2015 / 15:57