Using git in workspace subdirectory

git

#1

Hi,

I haven’t created a full C9 account yet but I’m wondering if it is possible to have a workspace with Git installed but not cloning a repo to the root of the workspace.

A clear example would be a WordPress site where the theme should be version controlled but the actual WordPress installed shouldn’t be so the repo would sit inside /wp-content/themes/.

So can git clone, commit, push etc from a sub directory in the workspace?

Thanks
Sam


#2

Yep, this is definitely doable. I’ve actually done this exact use case. While you can create a workspace from a git URL and clone it into the workspace root, you can also run git functions from the terminal in any directory you want to.


#3

Hey @bradydowling that’s perfect - aiming to go completely cloud based by February so Cloud9 is looking promising to take over the local development side of things! Thank for the reply!