Git Review is a powerful command-line tool designed to streamline code reviews by helping developers easily extract and analyze changes between Git commits.
- Git (version 2.25 or higher)
- Go (version 1.20 or higher)
- Operating Systems: Windows, macOS, Linux
To install Git Review, run:
go install github.com/gifflet/git-review@latestThe binary will be placed in:
- Linux/macOS:
$HOME/go/bin/git-review - Windows:
%USERPROFILE%\go\bin\git-review.exe
After installation, you must configure git-review as a global Git command for easier usage:
Linux/macOS:
git config --global alias.review '!"$HOME/go/bin/git-review"'Windows:
git config --global alias.review "!%USERPROFILE%/go/bin/git-review.exe"Once configured, you can run git review from anywhere within your repositories.
# Basic usage
git review -i <initial_commit>- π Compare two commits and get a comprehensive list of modified files
- πΎ Save diffs of modified files to a specified output directory
- πΏ Flexible branch comparison with optional main branch filtering
git review -i <initial_commit> [-f <final_commit>] [options]-i, --initial <commit>: Required. Starting commit hash for comparison-f, --final <commit>: Optional. Ending commit hash (defaults toHEAD)-m, --main-branch <branch_name>: Optional. Main branch for refined comparisons-p, --project-path <path>: Optional. Project directory path (defaults to current directory)-o, --output-dir <path>: Optional. Output directory for diff files (defaults togit-review)
git review -i c9286370git review -i c9286370 -f 78094299git review -i c9286370 -f 78094299 -m maingit review -i c9286370 -f 78094299 \
-m main \
-p "C:\Projects\MyRepo" \
-o "./review-output"- Permission Denied: Ensure you have read/write permissions in the project directory
- Commit Not Found: Verify commit hashes are correct and exist in your repository
- Large Repository: For repositories with extensive history, the process might take longer
- Recommended for repositories up to 10GB in size
- Processing time increases with number of files and commit complexity
- Large binary files might slow down diff generation
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-improvement) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-improvement) - Open a Pull Request
This project is licensed under the MIT License. See LICENSE for details.
Happy Reviewing! π