Hi All,
I am trying to archive a very large git repo using JGIT using the archive method available in JGIT library .We will be creating multiple archives per month/year . But we want to fetch the commits data from the archived repo whenever we need to use it .
git archive (ArchiveCommand in JGit) creates a compressed archive of files from a named tree [1].
This is equivalent to a compressed archive of a checkout of all the files in the specified version.
Such an archive does not contain any versioning meta data.
I could not find any way to fetch commits from archived repo on demand . Is it possible through Jgit.
A git archive does not contain commits but only the files of the version specified when creating the archive.
I am not sure what you want to achieve. If the purpose is to create backups in regular intervals you can mirror the repository
to create a backup copy containing the complete history of your repository.
git clone --mirror <repo url>
For the next backup you can, depending on your requirements, mirror the repository again to another copy
or update the existing one using git fetch origin.
Another lower-level option, which will also backup the reflogs and repository config,
is to create a filesystem snapshot to backup a git repository.
-Matthias
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jgit-dev