A cross-platform CLI tool to export modified files between two git commits while preserving directory structure.
npm install git-diff-copybash
npm install -g git-diff-copy
`
Or run via npx without installation:
`bash
npx git-diff-copy
`
Usage
1. Open your terminal in a git repository.
2. Run the command:
`bash
gdc
`
3. Follow the interactive prompts:
- Destination folder name: Where to copy the files (e.g., dist-patch, deploy-v2).
- First git commit hash: The starting point (older commit/base).
- Second git commit hash: The ending point (newer commit/head).
$3
`text
$ gdc
Destination folder name: my-patch
First git commit hash: a1b2c3d
Second git commit hash: e5f6g7h
Analyzing changes between a1b2c3d and e5f6g7h...
Found 3 changed file(s).
Success! Copied 3 files to:
/path/to/repo/my-patch
``