Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Commit affc030

Browse files
committed
update readme
1 parent 4f106cb commit affc030

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,25 @@ repodiff -b main -o output.txt
5050

5151
### Compare Two Specific Commits
5252

53+
To compare a specific commit with an earlier commit:
54+
5355
```bash
54-
repodiff -c abc1234 -d 5678def -o output.txt
56+
repodiff -c <newer_commit_hash> -p <earlier_commit_hash> -o output.txt
5557
```
5658

5759
### Compare a Commit with its Parent (Previous) Commit
5860

61+
To compare a specific commit with its direct parent:
62+
5963
```bash
60-
repodiff -c abc1234 -p -o output.txt
64+
repodiff -c <commit_hash> -p -o output.txt
6165
```
6266

6367
Parameters:
64-
* `-b`, `--branch`: Branch to compare with (e.g., `main` or `master`)
65-
* `-c`, `--commit1`: First commit hash
66-
* `-d`, `--commit2`: Second commit hash
67-
* `-p`, `--previous`: Compare the specified commit (via `-c`) with its parent commit
68-
* `-o`, `--output_file`: (Optional) Path to the output file. If not provided, the diff will be written to a default file in the system's temporary directory.
68+
* `-b`, `--branch`: Branch to compare the current branch's latest commit against (finds the common ancestor).
69+
* `-c`, `--commit`: The newer commit hash to include in the comparison.
70+
* `-p`, `--previous [PREVIOUS_COMMIT_HASH]`: Compare the commit specified by `-c` with a previous commit. If `PREVIOUS_COMMIT_HASH` is provided, compare against that specific hash. If omitted, compare against the parent of the commit specified by `-c`.
71+
* `-o`, `--output_file`: (Optional) Path to the output file. If not provided, the diff will be written to `repodiff_output.txt` in the current directory.
6972
* `-v`, `--version`: Display the current version of RepoDiff
7073
* `-h`, `--help`: Print help information
7174

0 commit comments

Comments
 (0)