JetBrains SpaceCode Preview Help

Commit to a Repository

SpaceCode lets you edit repository files directly from the browser, however to be able to consistently contribute to a repository, you need to clone the repository, i.e. set up its working copy on your local machine and work on it in your IDE.

Before you can clone a repository, you need to:

Now that you are ready to clone your SpaceCode repository, you can choose from these two options:

  • Clone the repository manually using your local terminal. See the instructions.

  • If you are using IntelliJ IDEA based IDE, you can have the repository cloned automatically. Furthermore, by linking your repository with your IDE you'll be able to navigate from SpaceCode to IDE and complete many tasks, such as creating merge requests or reviewing changes, right from your IDE. See the instructions.

Clone a repository using your terminal

  1. Locate and open the repository you want to commit to. All project repositories are shown in widgets on the project page.

  2. Go to the Files tab.

    The repository README file will be displayed.

  3. Read the repository specific set-up instructions outlined in the README file and find out whether you should use SSH or HTTPS to clone and access the repository.

  4. Go back to the repository page.

  5. Follow the instructions in README and copy the repository URL. It can be SSH or HTTPS depending on the requirements:

    repositoryURL.png
  6. Using the git clone <repository URL>command in your terminal, clone the repository to your local machine.

  7. Once it's downloaded, you'll be able to work on the source code in your IDE and commit changes to the origin.

Work on a repository in JetBrains IDE

All latest JetBrains IDEs come bundled with SpaceCode plugin that lets you access and use a lot of SpaceCode features and functionality right in your IDE without switching context. (Learn more about SpaceCode IDE plugin.) That includes viewing projects hosted in SpaceCode and cloning SpaceCode repositories.

But you can extend IDE integration even further by installing JetBrains Toolbox App, which gives you direct navigation from SpaceCode to your IDE. With a click of a button in SpaceCode, you can:

  • Clone and open your repository in the IDE.

  • Navigate to code reviews and examine changes in the IDE.

  • Open selected files in the IDE (will be available soon).

  • Create and check out a branch (will be available soon).

To clone your repository and start committing to it in your JetBrains IDE:

  1. Install JetBrains Toolbox app and log in to it.

  2. Enable SpaceCode plugin in your IDE. Go to Settings → Plugins. In the Installed tab, locate SpaceCode and enable it.

  3. With the Toolbox app running, open your repository page in SpaceCode.

    The Start coding button should display your IDE logo and a green dot, indicating that your IDE is now linked to SpaceCode. If not, make sure that SpaceCode plugin is enabled, and the Toolbox app is running.

    startCodingButtonActive.png
  4. Click the Start coding button.

    • Your IDE will open and prompt you to clone the repository.

    • After the repository is cloned, you'll be able to work on it in your IDE and open it from SpaceCode whenever the Toolbox app is running.

Last modified: 03 May 2024