docs

Move a repo from GitHub to Diffinite

Repoint origin, or push to GitHub and Diffinite at the same time.

You can point an existing local clone at Diffinite in one command, or keep pushing to both GitHub and Diffinite at once. Diffinite speaks plain git over HTTPS and SSH, so everything here is ordinary git remote plumbing.

Diffinite's remote URL has two forms. HTTPS comes first; SSH works the same way:

  • HTTPS: https://diffinite.sneka.ai/<owner>/<repo>.git
  • SSH: git@diffinite.sneka.ai:<owner>/<repo>.git

The commands below use the owner cartine and the repository quilt on both hosts; put your own owner and repository names in their place.

Before you push over HTTPS, run this once per machine:

sneka auth setup-git

It points Git's credential helper for diffinite.sneka.ai at the Sneka CLI, so HTTPS pushes use your Sneka sign-in with no password prompt. SSH needs your SSH key instead.

Redirect: replace GitHub with Diffinite

To switch an existing repo so git push and git pull go to Diffinite instead of GitHub, repoint the origin remote. Over HTTPS:

git remote set-url origin https://diffinite.sneka.ai/cartine/quilt.git
git push -u origin main

Or over SSH:

git remote set-url origin git@diffinite.sneka.ai:cartine/quilt.git
git push -u origin main

Confirm where origin now points:

git remote -v

Multiplex: publish to both GitHub and Diffinite

Git lets one remote have several push URLs. Add both hosts as push targets and a single git push mirrors to each. Over HTTPS:

git remote set-url --add --push origin https://github.com/cartine/quilt.git
git remote set-url --add --push origin https://diffinite.sneka.ai/cartine/quilt.git
git push origin main

Or over SSH:

git remote set-url --add --push origin git@github.com:cartine/quilt.git
git remote set-url --add --push origin git@diffinite.sneka.ai:cartine/quilt.git
git push origin main

After this, git remote -v shows one fetch URL and two (push) URLs. git fetch still pulls from the first URL only; git push writes to both.

This is standard git behaviour, not a Diffinite feature. You can undo it by clearing each extra push URL by name, for example git remote set-url --delete --push origin https://github.com/cartine/quilt.git.

Bring agent notes along

If your history carries sneka-agents notes, push that ref too so attribution travels with the commits:

git push origin refs/notes/sneka-agents

See the git/agent/notes spec for what those notes contain.