Package: repopacker
RepoPackerA low-tech solution to large files in GitInstallationUsageGotchasThe problemYou're working on a project and you find yourself accumulating large files
which are not well-suited for git leading you to add them to your .gitignore.Months pass, and you find yourself wanting to share your repository including all of
the large files which are now strewn about your repository and hidden from git.At this point your options are limited to git-lfs (which now requires
apaid subscriptionfor truly large files) or linking to an external storage container outside of the
repository which will often require refactoring.Enter RepoPackerRepoPacker is a command line tool built to work in harmony
with Git to solve this problem. In a nutshell RepoPacker follows a simple workflow:You specify which files should be tracked by RepoPacker.RepoPacker collects tracked files and packs them into a standard zip file.When sharing the repository, the person downloading your code downloads both the
repository and the zip file generated by RepoPacker.RepoPacker unpacks the zip file into the locations tracked by RepoPacker in your
local repository.The person downloading your code is left with a local git repository with the large
files in their right place.InstallationInstallation requiresgitandpython3.9+.
Once you've installed the required dependencies you can install repopacker via pip:pipinstallrepopackerUsageBasic functionalityAdd files:Add any large files / directories which you want tracked by
RepoPacker:repopackeraddlargefile.txt
repopackeradddir/This will create file named.repopacker.jsonat the GitHub root
of your project. It contains some basic config information and will act as
a storage container for RepoPacker.This command does two things:(1)largefile.txtand all the files indirwill be added into the list of RepoPacker tracked files.(2)largefile.txtand all the files indirwill be added to the.gitignorefor your project (you can disable this behavior by setting
the.gitignoreflag in the.repopacker.jsonto false).Note: files tracked by
RepoPackerwill nothave their changes tracked.
All RepoPacker stores is a
static link to the file.Pack:Once you have added all the files you want tracked you
can create a zip file,repopackerpackrepopack.zipYou should upload this to an accessible location such asdropboxorZenodo. Add the link to thedownloadpathin the.repopacker.json.
Optionally you can alsoUnpack:Populate directories with large files in their original locations,repopackerunpackrepopack.zipEasy downloadingSetup:When running pack, RepoPack will store the hash for the pack in
the.repopacker.json. You can setup a download link for your pack as,repopackerconfig--downloadpath<your-download-link.zip>Download:You can now automatically download the zip and unpack as usual:repopackerdownloadrepopack.zip
repopackerunpackrepopack.zipNote this will download a zip file from the internet. RepoPacker performs a basic
checksum using the SHA256 hash of the file but this does not guarantee the zip
file's integrity. Only use this option with repositories you can trust.Additional utilitiesInitialize:From an existing git repository initialize the RepoPacker system without
adding any files first.repopackerinitThis is useful if you want to setup some configuration options before adding
any files.List files:See all files currently tracked by repopacker:repopackerlistRemove files:If you accidentally add files to RepoPacker that you shouldn't
have you can remove them:repopackerremovelargefile.txtThis will also removelargefile.txtfrom the.gitignoreif you have the option
enabled.Configuration:See all configuration options:repopackerconfig-hClean:When downloading an updated version of the repopacker.zip, it can be useful
to clear all prexisting files tracked by RepoPacker:repopackercleanGotchasRepoPacker is not directly integrated with Git meaning any operations which update
the file tree (likegit mv) will not be known to RepoPacker.
You must remove files these files and re-add
them using RepoPacker for them to be properly tracked.