VCS presets
NOTE: This is not a general VCS guide. These are the exact three-operation presets that /scode-todo init writes today.
Standard git
This preset keeps the same branch-oriented pull and push flow as the original TODO repo, but the generated bin/commit
now stages everything before creating the commit.
bin/pulldetects the current branch, runsgit fetch origin "$branch", thengit merge --ff-only "origin/$branch".bin/pushdetects the current branch and runsgit push origin "$branch".bin/commitrunsgit add -Aand thengit commit --message="$message".
This is the default preset when the repo is just plain git and you are not using a wrapper layer like Graphite or Sapling.
Sources:
Graphite
This preset assumes the repository already uses Graphite-tracked branches and Graphite's pull-request workflow.
bin/pullrunsgt sync --all --force.bin/pushrunsgt submit --publish --no-edit.bin/commitrunsgt modify --all --commit --message "$message".
Why these commands:
gt syncis Graphite's sync-and-restack entry point, and--all --forcemakes it non-interactive across configured trunks.gt submitis the push operation that updates GitHub and Graphite PR state;--publish --no-editavoids inline prompting.gt modify --all --commit --messagestages all changes and creates a new commit instead of amending.
If the repo uses Graphite but you do not want PR-oriented pushes, use standard git or custom instead.
Sources:
Sapling
This preset assumes Sapling is the primary CLI for the repo.
bin/pullrunssl pull --rebase.bin/pushrunssl push --rev . --to <bookmark>.bin/commitrunssl commit --addremove --message "$message".
<bookmark> defaults to main during init unless the user asks for another remote bookmark.
Why these commands:
sl pullupdates the pulled remote graph and bookmarks;--rebasemakes it the normal sync operation before editing and, from the top of the stack, after a lower PR in that stack lands.sl push --rev . --to <bookmark>pushes the current commit to the chosen remote bookmark.sl commit --addremove --messagerolls the add/remove step into the commit so the wrapper stays a single operation.
If the repo needs --create, a non-default destination, or some more specific flow, use custom.
Sources:
Custom
Ask the user for three shell commands:
- The command for
bin/pull - The command for
bin/push - The command for
bin/commit
Rules for custom commit commands:
- The command must include its own staging step. There should still be only three wrapper operations in the repo.
- The command must use
$messageor${message}for the commit message slot. - Preserve the user's shell exactly. Do not try to normalize it into one of the presets after the fact.