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
Copy file name to clipboardExpand all lines: packages/dolt/content/concepts/dolt/git/diff.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,22 @@ For instance, are you expecting no `NULL` cells but have some? This indicates a
30
30
31
31
Programmatically, you can use SQL to explore very large diffs using the [`dolt_diff_<tablename>` system tables](../../../reference/sql/version-control/dolt-system-tables.md).
32
32
33
+
## Filtering Diffs by Change Type
34
+
35
+
When reviewing large diffs, you may want to focus on specific types of changes. The `dolt diff` command supports a `--filter` option to show only certain change types:
36
+
37
+
-`--filter=added` - Show only new tables and inserted rows
38
+
-`--filter=modified` - Show only schema modifications and row updates
39
+
-`--filter=renamed` - Show only renamed tables
40
+
-`--filter=dropped` - Show only dropped tables and deleted rows (alias: `removed`)
41
+
42
+
```bash
43
+
# Show only new tables and inserted rows as SQL
44
+
dolt diff HEAD~1 --filter=added -r sql
45
+
```
46
+
47
+
For SQL-based filtering, see the [`dolt_diff_<tablename>` system tables documentation](../../../reference/sql/version-control/dolt-system-tables.md#database-diffs), which supports filtering via `WHERE diff_type = 'added'` (or `'modified'`, `'removed'`).
48
+
33
49
## Difference between Git diffs and Dolt diffs
34
50
35
51
Git and Dolt diffs are conceptually the same. Display the differences between two sets of files in Git's case and tables in Dolt's case.
0 commit comments