Adding a Code Ocean capsule as a remote to an existing git repository
For integrating Code Ocean into your local development process.
Was this helpful?
For integrating Code Ocean into your local development process.
Was this helpful?
Click the capsule menu and select Clone via Git:
A message to appear with your capsule's git information:
Click Copy to copy the URL.
Navigate to your local git repo on your computer, run git init
if you have not already, and add the copied link as a remote (in the below example, the remote is called co
): git remote add co https://git.codeocean.com/capsule-<id>.git
You can check this worked by running git remove -v
Next, you will push your local files to Code Ocean by a command like git push co master
(in this example, the repo is on the master branch but yours might not be).
If this is your first time running git push
from your computer, you will be prompted for your username and password. Use your username and password for Code Ocean.
Your capsule will then show that changes are being pushed:
You can now push, pull, etc. between your local repo and Code Ocean, and the capsule will have your full git history displayed on its timeline.