top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to permanently erase big files to avoid big repository in GIT?

0 votes
374 views

I have tried some methods introduced in the network, but always failed. Some big files committed by me to a very old branch then the files deleted and new branches were continuously created. Now the checkout directory has grown to about 80 megabytes.

What's the right way to permanently erase those garbage big files?

posted Jul 15, 2014 by Bob Wise

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

1 Answer

+1 vote

You probably need to use "git filter-branch" or maybe BFG (http://rtyley.github.io/bfg-repo-cleaner/ ) to rewrite history as if the big files had never been committed. But beware of the warnings about rewriting history--for example, any collaborators will have to rebase their branches onto the new history.

answer Jul 16, 2014 by Majula Joshi
Similar Questions
+2 votes

I have a local repository and want to change the master branch to a server git. (I just don't want to delete all files in repository and then clone the server files)How to do that? I guess I have to fetch server data into local directory, merge an push it. Can someone please explain me how to do?

+1 vote

I wanted to avoid push if any of the files is deleted from the local git clone area. Can anyone please help me with that?

I am using Stash for repository management.

+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

As far as I can tell, there is no way I can create remote git repository from command line (git.exe in windows). if I am not mistaken shall you tell me why such limitation exist given that git is an old and mature project.

+1 vote

How to configure a read-only copy of a remote Git repository on a local server in bare mode and automatically synchronize its contents.

I need to configure a mirror of the repository hosted at another location and the mirrored repository should automatically perform syncing of code at regular intervals.

...