git-gc

Forcing Remote Repo to Compress (GC) with Git

不羁的心 提交于 2019-11-29 04:02:29
I'm using Git to version a series of binary files. They compress pretty well, but my central repos do not seem to be compressing when I push to them. They're eating up a decent amount of my quota, so I was looking to see if there was a way to force the remote repo to do a GC. Is this possible? I'm working on Project Locker so I don't believe I have SSH access to go in and GC the repo myself. Any ideas? Thanks. If you can't run git gc yourself, you're going to have to trick it into running automatically. You won't have quite such full control over it then, but you should at least be able to get

Stopping a git gc --aggressive, is that a bad thing?

强颜欢笑 提交于 2019-11-29 02:51:33
I am running a git gc --aggressive on a very large repo (apx 100 gb). It's been running since two nights ago, and as of a couple hours, it has been stuck on: "Compressing Objects: 99% (76496/76777)" If I Ctrl - C the process, what are the consequences? Will my repo be unusable? My intuition says no, but I'd like some opinions. Thanks! Seth Robertson git is supposed to be always safe from interruptions like this. If you are worried, though, I suggest Ctrl + Z and then run a git fsck --full to make sure the system is consistent. There are a number of git-config variables which might help your

Git gc using excessive memory, unable to complete

别来无恙 提交于 2019-11-28 06:45:26
Final update and fix : The solution here turned out to be a combination of two things: using Windows Git rather than Cygwin Git as Graham Borland suggested , and the Git config settings pack.threads = 1 and gc.aggressiveWindow = 150 . I have a large local Git repository, a git svn clone of an SVN repository with about 40,000 commits. I'm trying to run git gc over this repository, and getting nowhere: $ git gc --auto Auto packing the repository for optimum performance. You may also run "git gc" manually. See "git help gc" for more information. Counting objects: 25966, done. Compressing objects:

How to REALLY delete a git branch (i.e. remove all of its objects/commits)?

妖精的绣舞 提交于 2019-11-28 05:23:39
I have a git tree like A---B---C topic / D---E---F---G master <-- I would like to remove topic and all objects on it. I note the SHA ID of topic, then type: git branch -D topic git gc # <-- I also tried prune here... git checkout -b temp <SHA1 ID of topic> After the last command I expect to get an error (something like "Non-existent object ID..." or somth. like that). However there is no error and gitk shows the same tree structure as above?? What am I missing - I thought gc/prune are supposed to delete all unreachable objects? Duke Just the gc prune is often not enough to get rid of the extra

How can I trigger garbage collection on a Git remote repository?

拥有回忆 提交于 2019-11-28 04:50:16
As we know, we can periodically run git gc to pack objects under .git/objects . In the case of a remote central Git repository (bare or not), though, after many pushes, there many files under myproj.git/objects ; each commit seems to create a new file there. How can I pack that many files? (I mean the ones on the remote central bare repository, not on local clone repository.) The remote repo should be configured to run gc as needed after a commit is made. See the documentation of gc.auto in git-gc and git-config man pages. However, a remote repo shouldn't need all that much garbage collection,

Stopping a git gc --aggressive, is that a bad thing?

家住魔仙堡 提交于 2019-11-27 15:33:40
问题 I am running a git gc --aggressive on a very large repo (apx 100 gb). It's been running since two nights ago, and as of a couple hours, it has been stuck on: "Compressing Objects: 99% (76496/76777)" If I Ctrl - C the process, what are the consequences? Will my repo be unusable? My intuition says no, but I'd like some opinions. Thanks! 回答1: git is supposed to be always safe from interruptions like this. If you are worried, though, I suggest Ctrl + Z and then run a git fsck --full to make sure

Do I ever need to run git gc on a bare repo?

て烟熏妆下的殇ゞ 提交于 2019-11-27 13:03:14
man git-gc doesn't have an obvious answer in it, and I haven't had any luck with Google either (although I might have just been using the wrong search terms). I understand that you should occasionally run git gc on a local repository to prune dangling objects and compress history, among other things -- but is a shared bare repository susceptible to these same issues? If it matters, our workflow is multiple developers pulling from and pushing to a bare repository on a shared network drive. The "central" repository was created with git init --bare --shared . Mark Rushakoff As Jefromi commented

How to skip “Loose Object” popup when running 'git gui'

我怕爱的太早我们不能终老 提交于 2019-11-27 10:32:42
When I run 'git gui' I get a popup that says This repository currently has approximately 1500 loose objects. It then suggests compressing the database. I've done this before, and it reduces the loose objects to about 250, but that doesn't suppress the popup. Compressing again doesn't change the number of loose objects. Our current workflow requires significant use of 'rebase' as we are transitioning from Perforce, and Perforce is still the canonical SCM. Once Git is the canonical SCM, we will do regular merges, and the loose objects problem should be greatly mitigated. In the mean time, I'd

How often should you use git-gc?

☆樱花仙子☆ 提交于 2019-11-27 10:10:52
How often should you use git-gc? The manual page simply says: Users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance. Are there some commands to get some object counts to find out whether it's time to gc? Adam Davis It depends mostly on how much the repository is used. With one user checking in once a day and a branch/merge/etc operation once a week you probably don't need to run it more than once a year. With several dozen developers working on several dozen projects each checking in 2-3 times a

List of all commands that cause git gc --auto

独自空忆成欢 提交于 2019-11-27 05:15:39
Is there a definitive list of commands anywhere that cause git gc --auto to run? The git-gc(1) man page simply states: --auto With this option, git gc checks whether any housekeeping is required; if not, it exits without performing any work. Some git commands run git gc --auto after performing operations that could create many loose objects. (emphasis added) I'm in the process of organising a large migration from SVN to Git. The overwhelming majority of users will be on Windows PCs, and a not-insignificant portion of them are non-technical. They will be using TortoiseGit (as it closely matches