๐ gittxt re
Command¶
The re
(reverse) command reconstructs the original repository structure from a Gittxt output report. This is useful when you only have .txt
, .md
, or .json
exports and need the original source code files.
โ Syntax¶
gittxt re <report_file> [--output-dir <folder>]
๐ Description¶
- Accepts
.txt
,.md
, or.json
reports generated by Gittxt. - Extracts all reconstructable files and places them into a structured ZIP archive.
- Supports reports created with
--lite
,--no-tree
, or partial content.
๐ Input¶
Supported input formats:
- .json
(recommended)
- .txt
- .md
Each must follow Gittxt's output structure.
๐ฆ Output¶
Creates a ZIP archive containing the reconstructed project.
Output Structure¶
The resulting ZIP includes: - All reconstructed text files - Folder structure based on available report data
โ ๏ธ Limitations & Warnings¶
- If the input report used
--no-tree
, the directory tree may be incomplete. - If the report used
--lite
, asset metadata and some structure may be missing. - File content must be intact in the report.
Warnings shown in CLI:
โ ๏ธ Note: This report did not include a directory tree. Reconstructed structure may be limited.
โ ๏ธ Note: No non-textual assets were included in this report.
๐งช Example¶
gittxt re reports/project.json -o ./restored
Creates: project_reconstructed_<timestamp>.zip
under the default or specified --output-dir
.
๐ What Gets Reconstructed¶
- Files listed in the report
- Full paths and folder structure
- Textual content only (no binary files)
โ Best Practices¶
- Prefer
.json
for best reconstruction. - Validate output using the tree view or unzip locally.
Back: Clean | Next: Plugin โก