Skip to main content

The inverse of git archive. Adds a new commit from an archiveor the filesystem.

Project description

Gittar creates a git commit from a directory or an archive, allowing you to store a sequence of selective filesystem-snapshots as git commits.

Why?

The initial use case for gittar was storing a compiled version of an application in a seperate root inside a git repository. Here’s an example:

Assume you have a webapplication that needs to compile its assets before being deployed. You do not want to have to install a lot of LESS or JS compilers, CSS minifiers, etc. on your production environment.

First, you run your build tool (e.g. scons when using the scons-tools web module), now your app is inside the directory myapp, including the compiled static files, while the source files reside outside the myapp directory.

Now, you can run:

gittar -b web file:///`pwd`/myapp

This will create a new commit containing everything inside the myapp directory. If the branch web does not exist, it will be created and will point to the new commit, which will have no parent. If the branch did exist before, the new commit will have it as a parent and the branch will be updated.

A simple application for this is deploying to heroku. Build your app, add a new gittar-commit to the web branch and push it using git push heroku web:master.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gittar-0.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page