dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Feature request : a way to stop tracking a table

Open kertechs opened this issue 6 months ago • 1 comments

Hi,

I’ve been exploring the multitenant approach you described in your blog — one branch per customer. While testing this setup, I realized that I don’t want all tables from main to be merged into customer branches.

I came across the documentation on the dolt_ignore table, but it doesn’t seem to help once a table is already being tracked in the repository.

It would be very helpful to have a way to stop tracking a table — without deleting it — Perhaps something like a dolt rm command or a CALL DOLT_RM() procedure?

Thanks for the great work on Dolt!

kertechs avatar Jun 10 '25 05:06 kertechs

A workaround for this with current functionality is something like:

drop table t; 
call dolt commit('-am', 'deleted t'); 
call dolt_reset(HEAD^);

This will put t back in your working set untracked. Then, you can add it to dolt_ignore.

We're discussing whether we should add call dolt_rm() and dolt rm.

timsehn avatar Jun 11 '25 22:06 timsehn

Hi @kertechs we added a dolt_rm() stored procedure in the latest patch. I think for your specific use case you'll want to use the --cached flag, otherwise the procedure will also delete the tables from the database. Docs are here.

The command line version (dolt rm) will likely be added in the next patch.

NathanGabrielson avatar Jul 03 '25 16:07 NathanGabrielson