Frequently Asked Questions (FAQ)
October 9, 2025 Β· View on GitHub
π Table of Contents
- Installation and Environment Issues
- Usage Related Questions
- Output Format Questions
- Git Related Questions
- Cross-platform Issues
- Performance and Limitations
- Troubleshooting
π οΈ Installation and Environment Issues
Q: After installation, running weekly-git-summary shows "command not found"?
A: Please ensure:
- Use the
-gparameter for global installation:npm install -g weekly-git-summary - Check if npm global installation path is in PATH:
npm config get prefix - Reload terminal or execute
source ~/.bashrc/source ~/.zshrc - Or use
npx weekly-git-summarywithout global installation
Q: Getting "Node.js version too low" error?
A: This tool requires Node.js β₯ 22.0.0, please:
- Check current version with
node --version - Upgrade to the latest Node.js version
- Recommend using nvm to manage Node.js versions:
nvm install node && nvm use node
Q: Windows shows PowerShell script execution blocked?
A: This is PowerShell's security policy, please:
- Run PowerShell as administrator
- Execute:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - Or change to Bypass policy:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
π― Usage Related Questions
Q: How to generate reports for specific time ranges?
A: Use --since and --until parameters:
weekly-git-summary --since 2023-01-01 --until 2023-12-31
Q: How to view commits from specific authors only?
A: Use the --author parameter:
# Single author
weekly-git-summary --author "John Doe"
# Multiple authors (OR relationship)
weekly-git-summary --author "John Doe" --author "Jane Smith" --author "Bob Wilson"
# Using email
weekly-git-summary --author "johndoe@example.com"
# Handle author names with spaces
weekly-git-summary --author "John Doe" --author "Jane Smith"
Q: How to scan multiple project directories?
A: The tool automatically scans all Git repositories in the specified directory (max depth 2 levels):
weekly-git-summary --dir ~/projects
Q: Why are there no commit records?
A: Possible reasons:
- No commits within the specified time range
- No Git repositories in the directory
- Author filter conditions are too strict
- Current user doesn't have access permissions to Git repositories
- Message pattern filter conditions are too strict
Q: How to use time range presets?
A: Use the --time-range parameter:
# Today's commits
weekly-git-summary --time-range today
# Yesterday's commits
weekly-git-summary --time-range yesterday
# This week's commits
weekly-git-summary --time-range this-week
# Last week's commits
weekly-git-summary --time-range last-week
# This month's commits
weekly-git-summary --time-range this-month
# Last month's commits
weekly-git-summary --time-range last-month
Q: How to enable conventional commits analysis?
A: Use the --conventional parameter:
# Enable conventional commits analysis
weekly-git-summary --conventional
# Combine with time range
weekly-git-summary --conventional --time-range this-week
# Combine with author filtering
weekly-git-summary --conventional --author "John Doe"
This will display commit type distribution and breaking change indicators.
Q: How to filter specific types of commit messages?
A: Use the --message-pattern parameter (supports regular expressions):
# Show only feature and fix related commits
weekly-git-summary --message-pattern "feat|fix"
# Filter commits containing specific keywords
weekly-git-summary --message-pattern "user|login|auth"
# Use regular expressions for filtering
weekly-git-summary --message-pattern "^(feat|fix)(\(.+\))?:"
# Combine with conventional commits
weekly-git-summary --message-pattern "feat" --conventional
π Output Format Questions
Q: How to export to files?
A: Use output redirection:
# Export as Markdown file
weekly-git-summary --md > report.md
# Export as JSON file
weekly-git-summary --json > report.json
# Export as HTML file
weekly-git-summary --html > report.html
Q: Terminal displays garbled characters or incorrect formatting?
A: Please ensure:
- Terminal supports UTF-8 encoding
- Use terminals that support colors (like iTerm2, Windows Terminal)
- Set
LANG=en_US.UTF-8environment variable
Q: Can JSON output be used with other tools?
A: Yes, JSON format output is designed for integration with other tools:
# Use jq to process JSON output
weekly-git-summary --json | jq '.repositories[0].commits'
# Extract statistics information
weekly-git-summary --json --conventional | jq '.statistics'
# Get commit type distribution
weekly-git-summary --json --conventional | jq '.statistics.typeDistribution'
# Import to database or other systems
weekly-git-summary --json | curl -X POST -d @- http://your-api.com/reports
Q: How to view detailed statistics?
A: The tool automatically displays statistics including:
- Total commit count
- Number of participants and participant list
- Commit type distribution (when
--conventionalis enabled)
# View basic statistics
weekly-git-summary --time-range this-week
# View statistics with type analysis
weekly-git-summary --conventional --time-range this-week
# JSON format output contains complete statistical data
weekly-git-summary --json --conventional
π§ Git Related Questions
Q: What types of Git repositories are supported?
A: Supports all standard Git repositories:
- Local Git repositories
- Local clones of remote repositories (GitHub, GitLab, Bitbucket, etc.)
- Bare repositories
- Worktrees
Q: How are SSH and HTTPS repository URLs handled?
A: The tool automatically converts SSH URLs to HTTPS format for display in reports:
git@github.com:user/repo.gitβhttps://github.com/user/repossh://git@gitlab.com/user/repo.gitβhttps://gitlab.com/user/repo
Q: How to handle private repositories?
A: Ensure:
- Git credentials are properly configured
- You have read access to private repositories
- SSH keys or access tokens are properly set up
π Cross-platform Issues
Q: Inconsistent output results on different systems?
A: While core functionality is consistent, there may be minor differences:
- Date format parsing differences between Windows (PowerShell) and Unix (Bash)
- File path separator differences
- Color display support differences
Q: Permission errors on macOS?
A: You may need to:
- Grant terminal full disk access permissions
- Use
sudoto run (not recommended) - Check directory permissions:
ls -la /path/to/directory
Q: Missing dependencies on Linux?
A: Ensure necessary tools are installed:
# Ubuntu/Debian
sudo apt-get install git nodejs npm
# CentOS/RHEL
sudo yum install git nodejs npm
# Arch Linux
sudo pacman -S git nodejs npm
β‘ Performance and Limitations
Q: What to do when scanning large projects is slow?
A: Optimization suggestions:
- Reduce scanning depth (tool defaults to max depth 2 levels)
- Narrow time range:
--since 2023-01-01 --until 2023-01-31 - Specify specific project directories instead of root directory
- Use
--authorto filter specific authors
Q: Is there a limit on the number of repositories scanned?
A: No hard limit, but recommendations:
- Single scan should not exceed 100 repositories
- Large projects can be processed in batches
- Use JSON output for easier subsequent processing
Q: High memory usage?
A: For large projects:
- Use streaming processing, avoid loading all data at once
- Generate reports by time periods
- Clean unnecessary Git objects:
git gc
π Troubleshooting
Q: Getting "git command not found" error?
A: Please ensure:
- Git is installed:
git --version - Git is in PATH environment variable
- Restart terminal or reload environment variables
Q: Script execution fails?
A: Troubleshooting steps:
- Check if script files exist
- Confirm execution permissions:
chmod +x scripts/weekly-git-summary.sh - View detailed error information
- Try executing script manually
Q: Some repositories are skipped?
A: Possible reasons:
- Not a valid Git repository
- Repository is corrupted or incomplete
- Insufficient permissions
- Symbolic links point to invalid paths
Q: Missing some commits in output?
A: Check:
- Whether commits are within the specified time range
- Whether committer name/email matches filter conditions
- Whether it's a merge commit
- Whether local repository is synchronized with latest changes
π Getting Help
Q: How to report issues or suggest features?
A: Please visit:
- GitHub Issues: https://github.com/yinzhenyu-su/weekly-git-summary/issues
- Search existing issues: Look for similar problems
- Provide detailed information: Include system info, error messages, reproduction steps
- Feature requests: Describe requirements and use cases in detail
Q: How to contribute code?
A: Contributions welcome! Please:
- Fork the project to your GitHub
- Create a feature branch
- Add test cases
- Submit a Pull Request
- Refer to contributing guidelines in README.md
Q: How to get the latest version?
A: Check for updates:
# Check current version
weekly-git-summary --version
# Update to latest version
npm update -g weekly-git-summary
# Or reinstall
npm uninstall -g weekly-git-summary
npm install -g weekly-git-summary
π‘ Tip: If your question isn't answered here, please check GitHub Issues or create a new issue. We'll respond as soon as possible!