Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8675619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:59:39+00:00 2026-06-12T19:59:39+00:00

I have a repository for storing some large binary files (tifs, jpgs, pdfs) that

  • 0

I have a repository for storing some large binary files (tifs, jpgs, pdfs) that is growing pretty large. There is also a fair amount of files that are created, removed, and renamed and I don’t care about the individual commit history. This question is somewhat simplified because I’m dealing with a repository that has no branches and no tags.

I’m curious if there’s an easy way to remove some of the history from the system to save space.

I found an old thread on the git mailing list but it doesn’t really specify how to use this (i.e. what the $drop is):

git filter-branch --parent-filter "sed -e 's/-p $drop//'" \
        --tag-name-filter cat -- \
        --all ^$drop 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:59:41+00:00Added an answer on June 12, 2026 at 7:59 pm

    I think, you can shrink your history following this answer:

    How to delete a specific revision of a github gist?

    Decide on which points in history, you want to keep.

    pick <hash1> <commit message>
    pick <hash2> <commit message>
    pick <hash3> <commit message>   <- keep
    pick <hash4> <commit message>
    pick <hash5> <commit message>
    pick <hash6> <commit message>   <- keep
    pick <hash7> <commit message>
    pick <hash8> <commit message>
    pick <hash9> <commit message>
    pick <hash10> <commit message>  <- keep
    

    Then, leave the first after each “keep” as “pick” and mark the others as “squash”.

    pick   <hash1> <commit message>
    squash <hash2> <commit message>
    squash <hash3> <commit message>   <- keep
    pick   <hash4> <commit message>
    squash <hash5> <commit message>
    squash <hash6> <commit message>   <- keep
    pick   <hash7> <commit message>
    squash <hash8> <commit message>
    squash <hash9> <commit message>
    squash <hash10> <commit message>  <- keep
    

    Then, run the rebase by saving and quitting the editor. At each “keep” point, the message editor will pop up for a combined commit message ranging from the previous “pick” up to the “keep” commit. You can then either just keep the last message or in fact combine those to document the original history without keeping all intermediate states.

    After that rebase, the intermediate file data will still be in the repository but now unreferenced. git gc will now indeed get you rid of that data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that stores large amount of files (XML and binary) in
I currently have a Repository/UnitOfWork pattern down. However, there is one hard coupling that
Say I have two separate classes, A and B. I also have Repository class
I have a repository on my PC. Now I want to move some project
I have a repository class that inherits from a generic implementation: public namespace RepositoryImplementation
I have a repository that looks something like this: foo/ subrepo/ a_file_in_subrepo another.ext unrelated_file
I'm working with a git repository that's storing data for a website. It contains
I have a Mercurial repository for a personal project, and I have been storing
I have an application that does some batch jobs using MySQL and, via REST,
I have created a repository that is returning data from my database using Entity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.