You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 27, 2026. It is now read-only.
### Compare a Commit with its Parent (Previous) Commit
58
60
61
+
To compare a specific commit with its direct parent:
62
+
59
63
```bash
60
-
repodiff -c abc1234 -p -o output.txt
64
+
repodiff -c <commit_hash> -p -o output.txt
61
65
```
62
66
63
67
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.
69
72
*`-v`, `--version`: Display the current version of RepoDiff
0 commit comments