Skip to content

Commit b96a0f6

Browse files
docs: update README.md and bump version
1 parent b694199 commit b96a0f6

File tree

2 files changed

+75
-28
lines changed

2 files changed

+75
-28
lines changed

README.md

Lines changed: 58 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
# Git Markdown Diff Tool
22

3+
[![npm version](https://badge.fury.io/js/git-markdown-diff.svg)](https://www.npmjs.com/package/git-markdown-diff)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![Node.js Version](https://img.shields.io/node/v/git-markdown-diff.svg)](https://nodejs.org)
6+
37
A powerful CLI tool that generates beautifully formatted markdown files from git diffs, making code changes more readable and shareable.
48

9+
## Why?
10+
11+
So GitHub/GitLab/Bitbucket diff views works for you? Good. But sometimes those might be not your remote git provider and/or your diff view from your remote git providers might be not so friendly (at least for your eyes). This tool simply offers an alternative that lets you:
12+
13+
- Generate clean, readable diffs when your remote git provider diff views are unavailable or unfriendly
14+
- Work completely offline - only needs internet access when comparing remote branches
15+
- Export diffs as markdown to attach to tickets, docs, or discussions
16+
- Automatically filter out noise like lockfiles and build artifacts
17+
- Create permanent documentation snapshots of important changes
18+
- Share diffs easily with any stakeholders
19+
520
## Features
621

722
- 📝 Generates markdown files for each changed file in your git repository
@@ -12,6 +27,11 @@ A powerful CLI tool that generates beautifully formatted markdown files from git
1227
- 💡 Support for comparing specific commits, branches, or tags
1328
- 🚀 Progress indicators for long-running operations
1429

30+
## Requirements
31+
32+
- Node.js >= 18
33+
- Git installed and accessible from command line
34+
1535
## Installation
1636

1737
```bash
@@ -72,6 +92,23 @@ Each generated markdown file includes:
7292
- Timestamp and timezone information
7393
- Dark-mode friendly styling
7494

95+
## Example Output
96+
97+
```markdown
98+
# Changes in `src/components/Button.js`
99+
100+
## File Statistics
101+
src/components/Button.js | 25 +++++++++++++++++--------
102+
103+
## Changes
104+
```diff
105+
- import React from 'react';
106+
+ import React, { useState } from 'react';
107+
108+
const Button = ({ label }) => {
109+
+ const [isHovered, setIsHovered] = useState(false);
110+
```
111+
75112
## Excluded Files
76113

77114
The tool automatically excludes common files that typically don't need diff review:
@@ -84,6 +121,17 @@ The tool automatically excludes common files that typically don't need diff revi
84121
- Environment and secret files
85122
- Minified files
86123

124+
## Roadmap
125+
126+
Future improvements under consideration:
127+
128+
- [ ] Custom output directory option
129+
- [ ] HTML export option
130+
- [ ] Integration with CI/CD pipelines
131+
- [ ] Custom exclusion patterns
132+
- [ ] Multiple diff format support
133+
- [ ] Interactive mode for file selection
134+
87135
## Contributing
88136

89137
We welcome contributions to improve the Git Markdown Diff Tool! Here's how you can help:
@@ -140,31 +188,15 @@ This tool uses several open-source packages:
140188

141189
### Common Issues
142190

143-
1. **Git command failed**
191+
1. **Git command fails**
192+
```bash
193+
Error: Git command did not succeed. Script cannot proceed.
194+
```
144195
- Ensure you're in a git repository
145-
- Verify git is installed and accessible from command line
146-
147-
2. **Permission errors**
148-
- Check write permissions in the output directory
149-
- Run with appropriate privileges
150-
151-
3. **Memory issues with large repositories**
152-
- Tool uses a 10MB buffer for git operations
153-
- Consider using specific commit ranges instead of full history
154-
155-
### Getting Help
156-
157-
- Open an issue on GitHub for bugs
158-
- Start a discussion for feature requests
159-
- Check existing issues before creating new ones
196+
- Check if git is installed: `git --version`
197+
- Verify git is configured: `git config --list`
160198

161-
## Roadmap
162-
163-
Future improvements under consideration:
164-
165-
- [ ] Custom output directory option
166-
- [ ] HTML export option
167-
- [ ] Integration with CI/CD pipelines
168-
- [ ] Custom exclusion patterns
169-
- [ ] Multiple diff format support
170-
- [ ] Interactive mode for file selection
199+
2. **No output generated**
200+
- Verify you have changes to diff
201+
- Check if files are excluded by default patterns
202+
- Try specifying explicit commit ranges

package.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,27 @@
1212
"keywords": [
1313
"git",
1414
"diff",
15-
"markdown"
15+
"markdown",
16+
"git-diff",
17+
"documentation",
18+
"changelog",
19+
"development-tools"
1620
],
17-
"author": "",
21+
"author": "Bayu Prakoso",
1822
"license": "MIT",
1923
"dependencies": {
2024
"commander": "^11.0.0",
2125
"ora": "^8.1.1"
26+
},
27+
"repository": {
28+
"type": "git",
29+
"url": "git+https://github.com/bayuagpr/git-markdown-diff.git"
30+
},
31+
"bugs": {
32+
"url": "https://github.com/bayuagpr/git-markdown-diff/issues"
33+
},
34+
"homepage": "https://github.com/bayuagpr/git-markdown-diff#readme",
35+
"engines": {
36+
"node": ">=18"
2237
}
2338
}

0 commit comments

Comments
 (0)