Committing large folders

A commit has no size limit. However many files you bring into a repository at once, years of documents or a folder a tool has just rewritten, synck commit records them as one commit, accepted all at once or not at all. What deserves care is not the size of the commit but what goes into it, because everything you commit becomes permanent history.

Before you commit a large folder

Two minutes of preparation saves a lot of cleanup.

  1. Check .synckignore and commit any change to it. Exclude caches, build output, exports and anything else you do not want to keep forever. See Telling Synck what to ignore.
  2. Decide about hidden files. They are ignored by default. Change the setting with synck config set-hidden-files track before you commit if you want them.
  3. Check for things you should not commit, such as passwords, keys and personal data. Once committed, they cannot be removed from history.
  4. Look at synck status. It lists everything the commit will record, so you can spot a folder that should have been ignored.

Commit it

Copy or move the folder into the repository’s folder, check status, and commit as usual:

$ synck status | tail -2
A archive/2023/memo-998.txt
A archive/2023/memo-999.txt
$ synck --json status | jq ".changes | length"
5006
$ synck commit -m "Import the archive"
committed sha256:49bf6c5d8f1068126bee3ef433a4995da93d11d4b20f40571fb4c2e1817f1338
$ synck log --oneline
2 | 2026-11-04 01:27 +01:00 | Alex | Import the archive
1 | 2026-11-04 01:27 +01:00 | Alex | Initialize Synck repository

The five folders and 5,000 files in this archive are one commit. Synck reads, hashes and stores every file before it records anything, so a large commit takes a while. You can name paths, as with any commit, to record only part of the working tree.

If the commit is interrupted

A large commit is still one atomic commit. If the computer crashes or you stop the command, either the commit was not recorded, and your history and files are as they were, or it was accepted, and the next Synck command finishes the bookkeeping after it. Check synck log and synck status before you try again; do not assume that nothing happened. When an operation is interrupted explains both cases.

Undoing a large commit

To take back a folder you committed, delete it and commit:

$ rm -rf archive
$ synck commit -m "Remove the archive"
committed sha256:b67717f1d7a378b11a41ecf6c2612fc1afc18fec632703489e6c3422e439a86a
$ synck log -n 1
3 | 2026-11-04 01:28 +01:00 | Alex | 5006 changes (100 shown) | Remove the archive
    D archive
    D archive/2019
    D archive/2019/memo-1.txt
...
    Run `synck show 3` for the complete change list.

The folder and everything in it move to the trash, and the commit that brought them in stays in the history. If you change your mind, synck recover archive -m "..." brings the whole folder back with its identity and history. See Recover a deleted item.