gitzip
Export all the changed files between two git commits or branches to a zip file including the directory structure.
gitzip usage
gitzip allows to copy all files that changed between two commits (or branches) into a
zip file.
Expect a git repository being at commit 0c321f2. If two new files are created, e.g.
README.md and docs/screenshot.jpg, git status gives:
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: README.md
new: docs/screenshot.jpg
After committing those changes, the command
python -m gitzip export.zip 0c321f2
will create a export.zip file. This file contains all files that changed between commit
0c321f2 and the current master branch. So in the given example, the zip file will
have the following structure:
📦export.zip
┣ 📂docs
┃ ┗ 📜screenshot.jpg
┗ 📜README.md
The files will have the contents that are currently checked out in the repository.
Installation
Via pip
pip install gitzip
From source
To run this program from the code directly, python and
poetry (pip install poetry) are required. Clone or
download the repository.
To install all the dependencies, use your command line and navigate to the directory
where this README file is located in. Then run
poetry install
For development
For development installation perform the From source installation.
For installing new packages, always run
poetry add <pip-package-name>
instead of pip install <pip-package-name>.
Launch the program either check out the Execution section or use the Run and Debug-side panel of VSCode.
If the interpreter of the virtual environment does not show up in VSCode, add it manually. The virtual environments are located in {cache-dir}/virtualenvs/<venv-name>/Scripts/python.exe where the {cache-dir} depends on the operating system (~/.cache/pypoetry, ~/Library/Caches/pypoetry or C.\Users\%USERNAME%\AppData\Local\pypoetry\Cache).
Execution
To execute the program use
poetry run python -m gitzip
Release files for gitzip 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gitzip-2.0.1.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitzip-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.1 kB
Release files / gitzip-2.0.1.tar.gz
| Download URL | gitzip-2.0.1.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6574b345396b140829f2f0678af74eb258c84936ddef4ad0bf2ae727150c8a62
|
|
BLAKE2b-256 checksum How to use checksums |
6fbd127d03699ad887ae7be4498151a8d55f20a3106182520b1a2e95a03998cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.12 Windows/10
|
Release files / gitzip-2.0.1-py3-none-any.whl
| Download URL | gitzip-2.0.1-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8794b63b1597a01180de0d6f0fc911b476d3bab6d706ba12453b0f322a81101b
|
|
BLAKE2b-256 checksum How to use checksums |
c7ab6e2da1cf17936b393252e05046e662f4c989dbf6c873c64ee0cb41d4b8be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.12 Windows/10
|