← 返回命令列表

Linux command

dolt-add 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Stage all changes

dolt add .

Stage specific table

dolt add [table_name]

Stage multiple tables

dolt add [table1] [table2]

说明

dolt add stages table changes for the next commit. Unlike git add which operates on files, dolt add stages database tables that have been modified, added, or deleted. The command marks tables with pending changes (inserts, updates, deletes) to be included in the next commit. Staging allows selective committing of changes across multiple tables, similar to Git's index concept but applied to database schema and data modifications. Using dolt add with specific table names stages only those tables, while using `.` or `-A` stages all modified tables in the working set.

参数

-A, --all
Stage all tables.

FAQ

What is the dolt-add command used for?

dolt add stages table changes for the next commit. Unlike git add which operates on files, dolt add stages database tables that have been modified, added, or deleted. The command marks tables with pending changes (inserts, updates, deletes) to be included in the next commit. Staging allows selective committing of changes across multiple tables, similar to Git's index concept but applied to database schema and data modifications. Using dolt add with specific table names stages only those tables, while using `.` or `-A` stages all modified tables in the working set.

How do I run a basic dolt-add example?

Run `dolt add .` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -A, --all do in dolt-add?

Stage all tables.