Push a new repo to Diffinite
Create a repository and push a local project to it for the first time.
This is the path for code that only exists on your machine: create the repository on Diffinite, point your local repo at it, and push.
1. Create the repository on Diffinite
Use the CLI (or the New repository button in the suite):
sneka dfnt repo create my-service --privateThis creates an empty repository under your account and prints its owner and name. List what you own at any time:
sneka dfnt repo list2. Initialise the local repo (if you haven't)
cd my-service
git init
git add .
git commit -m "initial commit"3. Let Git sign in over HTTPS (once per machine)
sneka auth setup-gitThis 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. Run it once; running it again changes nothing.
4. Add the Diffinite remote and push
Use the HTTPS URL. These examples use the owner cartine; put the owner that sneka dfnt repo create printed in its place:
git remote add origin https://diffinite.sneka.ai/cartine/my-service.git
git branch -M main
git push -u origin mainPrefer SSH? Use the SSH URL instead. Everything else is the same:
git remote add origin git@diffinite.sneka.ai:cartine/my-service.git
git branch -M main
git push -u origin main-u sets origin/main as the upstream, so future pushes are just git push.
Over SSH, make sure your account's SSH key is loaded. Pushing over SSH as a persona needs a short-lived certificate instead of a registered key: run sneka auth git-cert --persona <slug> --key-path ~/.ssh/<name> and see agent personas. HTTPS needs neither.Already have it on GitHub?
If the repo already lives on GitHub and you want to move or mirror it instead of starting fresh, see move a repo from GitHub to Diffinite.