On Wed, Apr 09, 2014 at 10:49:57PM -0700, YuFan Lou wrote:
> I found that the script in my plugins take up a fairly small space compared 
> to the .git folder during a disk cleanup. Though it is still small enough for 
> it to be ignored during the process, I wonder what can be done to trim it. 

If you don't need the history or beeing able to take part in the
development of the plugins I suggest you instead of fetching the git
repository just fetch a tarball of the worktree.

Or you could just use the --depth option with git clone.

> For example, syntastic. The .git folder is 3.2 MB, while the plugin itself is 
> only 0.8 MB altogether, only 1/4 of the .git folder. An extreme example would 
> be unite.vim, whose .git folder is 8.8 MB but its latest content is only 0.9 
> MB.

That's because the repository contains all older versions of the
project. Seen in that light it's actually quite small. The worktree is
0.8 MB and all 1791 versions of it is 3.2 MB in total.

> I use Windows 8 and it boots on a 60 GB SSD, so although this is not 
> troublesome at the time, it still bothers me a bit. How fast does this ratio 
> grow?

That's impossible to answer since it depends on what changes are made to
the project and how well those changes can be represented in deltas of older
versions the project.

> Can I configure git or Neobundle or Vundle to trim it down instead of 
> manually (or with script) deleting all the .git folder myself?

Yes it's possible to trim it down, you can use git gc, git repack and
git filter-branch (that will alter the history of the project). How ever
I _strongly advise_ you to _not_ do this. The gain is too small and you
need to understand git to do it.

> What's the risk of deleting them besides loss of commit history?
Nothing except that it won't be a git-repository anymore and you could
just fetch the tarball and save yourself the trouble.


-- 
Med vänlig hälsning
Fredrik Gustafsson

tel: 0733-608274
e-post: iv...@iveqy.com

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to