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 3696628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:45:43+00:00 2026-05-19T04:45:43+00:00

I am looking for a solution to backup multiple shared git repositories, each with

  • 0

I am looking for a solution to backup multiple shared git repositories, each with multiple branches, and some of the branches get rebased and forced (I know that’s against best practices, but it is something that I have to deal with now)

I was thinking a simple git clone --mirror and then periodically git remote update would be enough, but that won’t keep anything that gets rebased with a push force.

I experimented with git bundle and I don’t think it’s a good solution for what I am trying to do here.

Looking for something incremental, light and easy to use for recovery, I am thinking maybe git format-patch can be used to script the recording of every single new commit that happens anywhere. Is this too much for the task?

  • 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-05-19T04:45:43+00:00Added an answer on May 19, 2026 at 4:45 am

    I think the clone --mirror approach is worth looking back at. If you want to recover a past position of a branch which was force-pushed, just have a look at the reflogs. To be absolutely sure about this, you can set gc.pruneExpire to never, and the same for gc.reflogExpireUnreachable, so that reflogs and unreachable objects will never be removed. That ought to cover you. Important note: reflogs are by default disabled in bare repositories. You can enable them by setting core.logAllRefUpdates.

    Do note that the reflogs in the pushed-to repository will contain records of any forced pushes that happen. If you want to be even more sure about this, you could even write an update hook that detects incoming forced updates and records them somewhere special, perhaps by creating a ref, something like refs/backups/mybranch-{n}.

    And really, there’s nothing wrong with some branches being rebased frequently, as long as it’s in a well-defined way, so that no one is caught off guard. The pu branch in git.git is a perfect example of this.

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

Sidebar

Related Questions

I'm looking for some backup solution. My request is pretty simple: Source - FTP
Just looking for the first step basic solution here that keeps the honest people
I am looking for a simple templating solution for ruby, i.e. something that will
I am looking for a dedicated server because shared webhosting solutions have some limitations.
We are looking for a free solution to compress our SQL Server backups for
Looking for a solution in bash (will be part of a larger script). Given
I was looking for a solution for client side printing of reports and pre
I'm looking for an online solution for generating .ICO files. I'd like the ICO
I'm looking for a quick-and-dirty solution to this, I have to set up a
I am looking for a better solution than what we currently have to deal

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.