Can a workspace be switched to another cloned project?

workspace

#1

I am currently using the free plan, and have a number of nodejs workspaces cloned from various github projects (plus one workspace created from scratch for tinkering, if it matters).

One of my cloned workspaces has more disk (5GB vs. 2GB) and memory (1GB vs. 512MB) than the others. If this is a premium workspace, I am not sure how I got it, but it was created by cloning a github project that is no longer relevant to me.

If possible, I would like to switch that workspace so that a different cloned github project is in it.

I know I can manually use the ‘git clone’ command from the bash prompt within the c9 workspace, but this apparently does not update the ‘cloned from’ line of the project on the dashboard page (which continues to refer to the original project). Even if I ignore that, I am still unsure whether doing this will have any ramifications down the road.

Is there an “official” way to abandon the project in a given workspace and clone another project into it?


#2

There is no way to change that description, but it doesn’t affect anything.
Cloud9 runs the following code when cloning, so just cloning the new repo should work fine

rm -rf ~/workspace
mkdir -p ~/workspace
cd ~/workspace
git init .
git remote add origin git@....
git fetch origin
git remote set-head origin -a
git reset origin/HEAD --hard

#3

Awesome! So, if I do this instead it ought to work the same:

rm -rf ~/workspace
git clone git@... ~/workspace

right?


#4

right