Push Changes to Remote

Open inAnthropic

Prerequisites

  • TerminusDB running locally (install guide)
  • A cloned database with local changes (clone guide)
  • Write access to the remote database

What you'll achieve By the end of this guide, you will have pushed local commits to a remote TerminusDB server — like git push for databases.

After making changes to your local clone, push sends those commits to the remote so others can access them.

Push to a remote

Push your local main branch to the remote origin:

Example: TypeScript
const pushToRemote = async () => {
  client.remoteAuth({ type: "token", key: "YOUR_API_TOKEN_HERE" })

  const result = await client.push({
    remote: "origin",
    remote_branch: "main",
    message: "Push local changes to remote",
  })
  console.log("Push result:", result)
}

Push requires write access to the remote database. For public data servers (like data.terminusdb.org), you can only pull — not push. Push works with your own DFRNT Hub databases or self-hosted remotes where you have credentials.

Push a specific branch

Push a feature branch to a new remote branch:

Example: TypeScript
const pushFeatureBranch = async () => {
  client.remoteAuth({ type: "token", key: "YOUR_API_TOKEN_HERE" })
  client.checkout("feature")

  const result = await client.push({
    remote: "origin",
    remote_branch: "feature",
    message: "Push feature branch for review",
  })
  console.log("Feature branch pushed:", result)
}

Next steps

  • Pull updates — fetch changes others have pushed
  • Branch — create a feature branch before pushing
  • Clone — start from a fresh clone of a remote database

Was this helpful?