Cloud9 (C9) – Add a Workspace to Bitbucket

When you need to add a clean workspace in Cloud9 online IDE (c9.io) to a Bitbuck (or GitHub) repository after it is created (that is, when it is not already connected to source control).

Steps to make it happen:

  1. Create a new repo in Bitbucket.
  2. “git init” from command-line in the directory to act as the root of the new repo.
  3. Run “git remote add …” (e.g. “git remote add origin git@bitbucket.org:jsnelders/wp-test.git”)
  4. Run “git add” and “git commit -m” command to add files to Git staging, then commit (with a comment).
  5. Run “git push” to push the committed files to the origin

You can also:

  1. Add a .gitignore file.
  2. For WordPress, it may be worth adding “wp-config.php” to the .gitignore, depending on whether you store sensitive information (passwords, API keys) in the file.

See also: