Skip to main content

Push Changes

Once you’ve committed changes to a local repository, you can push them to a remote with oxen push
oxen push origin main
If you don’t supply a remote name or branch, they default to origin and the current branch respectively.
oxen push

Resume Push

If a push is cancelled partway through, you can use the --missing-files flag to resume push progress and upload the remaining files
oxen push --missing-files

Set Remote

You can use oxen config --set-remote to set the remote for a repository. This allows you to push changes to that remote, provided you’ve set the API key and have permission.
oxen config --set-remote origin https://hub.oxen.ai/ox/CatDogBBox

View Remotes

The oxen remote command allows you to view what remotes you have for a repository
oxen remote
origin
Use the --verbose flag to list the remotes with their URLs
oxen remote -valid
origin  https://hub.oxen.ai/ox/CatDogBBox
local_dev   http://localhost:3000/ox/CatDogBBox

Create Remote

You can also create a remote from the CLI with oxen create-remote.
oxen create-remote --host hub.oxen.ai --scheme https --name ox/SampleRepo

Workspaces

You can also stage changes to a remote by using a Workspace. This allows you to skip copying files to a local repository, making it ideal for bulk imports. Create a workspace on a branch with oxen workspace create
oxen workspace create
You can then add the files with oxen workspace add, uploading their contents to the remote and staging them for commit
oxen workspace add images --workspace-id 117abd2d-3363-497d-ac93-a5cb3c280234
Then, commit the changes with oxen workspace commit
oxen workspace commit -m "Uploading Images" --workspace-id 117abd2d-3363-497d-ac93-a5cb3c280234