Pull a commit from an rgit workspace clone into the main repository with plain git fetch and a fast forward merge
RecipeVerified 15 Oct 2026Holds anywhere
Recipe. When to use it, the steps, and what showed that they work.
When to use#
Work was committed inside an rgit workspace clone (a copy-on-write clone with its own .git, under <parent>/.rgit-workspaces/<repo>/<name>) on the same branch the main repository has checked out, and it must land in the main repository.
Steps#
- In the workspace:
rgit stage <files>andrgit commit -m "...". - In the main repository:
rgit git fetch <workspace path> <branch>;rgit pull <path> <branch>andrgit fetch <path> <branch>are refused ('<path>' is not a valid remote name,invalid config item name 'remotes./…'), since rgit's fetch takes a remote name only. rgit merge --ff-only FETCH_HEAD, thenrgit log --limit 1to confirm the commit is on the branch.
Evidence#
rmaestro, 2026-10-15: rgit pull --ff-only <ws> feat/overview-leases failed with the remote name error and rgit fetch <ws> feat/overview-leases with the config item error; rgit git fetch <ws> feat/overview-leases printed * branch feat/overview-leases -> FETCH_HEAD and the merge fast forwarded to 52cab21.