Commit to a Repository
Space 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 or use remote development environment.
Before you can clone a repository, you need to:
Have the latest version of Git installed on your machine and have your commit username and email address set up in Git. Make sure your commit email address matches the email in your Space profile, as Space will use this email to associate your commits with your Space identity.
Be a project member or contributor and have the
Write Git repository
permission to be able to commit to the project repositories. Contact your project administrator if you're not sure you that have it.
Now that you are ready to clone your Space 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 Space to IDE and complete many tasks, such as creating merge requests or reviewing changes, right from your IDE. See the instructions.
As an alternative to cloning the repository to your local machine, you can start committing to it using Space remote development environment.
Clone a repository using your terminal
Locate and open the repository you want to commit to. All project repositories are shown in widgets on the project page.
Go to the Files tab.
The repository README file will be displayed.
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.
To access the repository via SSH, you need to have an SSH public key generated and uploaded to your Space profile.
To access the repository via HTTPS, you can use your personal token or an application password.
The scope of permissions for your token or application password should include
Git write repository
andGit read repository
permissions.You may be also required to have a GPG key for signing your commits.
Go back to the repository page.
Follow the instructions in README and copy the repository URL. It can be
SSH
orHTTPS
depending on the requirements:Using the
git clone <repository URL>
command in your terminal, clone the repository to your local machine.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 Space plugin that lets you access and use a lot of Space features and functionality right in your IDE without switching context. (Learn more about Space IDE plugin.) That includes viewing projects hosted in Space and cloning Space repositories.
But you can extend IDE integration even further by installing JetBrains Toolbox App, which gives you direct navigation from Space to your IDE. With a click of a button in Space, 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:
Install JetBrains Toolbox app and log in to it.
Enable Space plugin in your IDE. Go to Installed tab, locate Space and enable it.
. In theWith the Toolbox app running, open your repository page in Space.
The Start coding button should display your IDE logo and a green dot, indicating that your IDE is now linked to Space. If not, make sure that Space plugin is enabled, and the Toolbox app is running.
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 Space whenever the Toolbox app is running.
Work on a repository in dev environment
With the remote development environment you don't have to keep your repository copy locally. The data is securely stored in a remote server, and you can access it and work on it from any laptop, even the slowest one.
Your project opens in a remotely installed IDE which runs all the resource consuming processes as a backend service. You connect to the IDE backend using a thin frontend client installed on your machine. The client's fully functioning UI lets you work on your project as if the IDE were running locally.
Find out how you can benefit from dev environment and learn how to set it up for yourself.