top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

GIT:What is a thin pack?

+2 votes
368 views

Please describe what is a thin pack and what are the difference between pre 1.8.5 and 1.8.5 about thin pack support?

posted Dec 5, 2013 by Kumar Mitrasen

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Under the hood objects are deltified, only the differences between an object and its base are stored. If both the diff and the base are in a pack, it's a normal pack. If the pack lacks the base, it's "thin". This makes thin packs more suited for network transfer because you transfer much less.

Imagine you have a 5k file, you fetch another version of the same file that changes 1 line. With thin pack, you receive just that line (not entirely true, but good enough). Without thin pack, you also receive the 5k file you already have because it's the base of the new version.

answer Dec 5, 2013 by Abhay Kulkarni
Similar Questions
+1 vote

Is it possible to make a git remote pack its repository on every push?

I have tried setting gc.auto to 1 on both the remote and the clients, but so far no push seems to have packed anything.

Do I need to create a push hook on the remote to make it pack?

The reason for this is that I have several git repositorier for org-mode files.

Having a history, and rollback of the history, is more important than having a good history.

The diff of each push is small, the repositories only contain one, or a handful of org-mode files, and some of the org-mode files are quite large.

The remote is git 1:2.1.4-2.1 (debian packge, git --version reports 2.1.4), running on debian 8.0 "jessie".

The clients are various GNU/linux git (whatever comes with the distro out of the box) and Win32 msysgit installations.

0 votes

I have a problem with an already committed file into my repo. This git repo was converted from svn to git some years ago. Last week I have change some lines in a file and I saw in the diff that it is marked as binary (it's a simple .cpp file). I think on the first commit it was detected as an utf-16 file (on windows). But no matter what I do I can't get it back to a "normal text" text file (git does not detect that), but I is now only utf-8. I also replace the whole content of the file with just 'a' and git say it's binary.

Is the only way to get it back to text-mode?:
* copy a utf-8 version of the original file
* delete the file
* make a commit
* add the old file as a new one

I think that will work but it will also break my history.

Is there a better way to get these behavior without losing history?

+2 votes

I am getting this there while updating Sub module in my main project

+3 votes

When we clone a remote GIT repository, all folders/files will be cloned. This will consume lot of disk space in our local machine.
Is there a way to clone only few folders & exclude others?

This is possible in clearcase snapshot view by changing load rules.

...