Introducing Workspace Cloning
By Lennart Kats • 03 March 2016
Today we’re introducing workspace cloning to Cloud9. Workspace cloning allows you to make an exact 1:1 copy of a Cloud9 workspace, including everything you apt-get installed, the local database, the open tabs, everything. Do you have a cool project you’re working on in Cloud9, and wish you had two of them? Now you can clone it!
- Go to your list of projects
- Click on the Clone button
Why clone workspaces?
Now, if you’re asking why you would want to do this, let’s take a step back. One of the greatest benefits of coding in the cloud is the ability to manage multiple configurations for different projects, with the convenience of needing only a browser. One project you worked on might use Node 0.10, while another uses a the very latest LTS version, and yet another project may use the brand-new version 7 of PHP that you installed following some guide on the internet. Each of those projects lives in what we call a workspace.
Let's consider some example use cases.
You have everything configured and want to work on two or three feature branches in parallel.
You installed dependencies that you commonly use in a workspace, and clone it for a new project or client.
You have everything setup for that important demo, but also want to have a workspace for the next big thing you’ll work on.
You made this cool WordPress application and want to share it with your aunt, but you don’t want her to add hundreds of “funny” cat picture posts to the workspace you’re working on every day. She gets her own database.
You're fed up with using nvm, rvm, gvm, virtualenv, or whatever tool to keep switching runtimes. You just want to click a link and open your workspace and have the right runtime for the right project.
You just implemented a new feature and want to share that with a coworker for review. You clone the workspace, share a link to it in a github PR, and your coworker can edit and run the code while you work on something different.
How we use it ourselves
At Cloud9 we use use Cloud9 to build Cloud9 and have used the cloning feature ourselves for a while to work on different branches of Cloud9. Below is the list of my own recent projects, where I used the cloning feature to create a separate workspace:
Each of these clones diverged to have their own branch and workspace state: they may have different files open, different run configurations open, etc. Some people setup local virtual machines with VirtualBox or Vagrant to work on many different configurations like that. With a cloud IDE, all you need is a browser and a mouse to click on the link to clone and open a workspace.
As of today you can clone your own workspaces. Be fruitful and increase your workspaces in number! And let us know how you're using workspace cloning on our community pages. In the near future you'll be able to clone other people's workspaces within teams too, opening a wealth of new possibilities, but we're working to address the security implications of that.