We removed our free Sandbox April 25th.
You can read more on our blog.

Git and Mercurial

Note

CLI Command examples on this page are always provided without the --application (shorthand -A) argument, assuming you’re running these commands in a connected folder (at creation or using the dotcloud connect command). For more details on connected folders, see Migrating to the CLI 0.9.

Mode Selection

CLI 0.9 no longer does automatic mode selection for pushes. Instead, CLI 0.9 defaults to rsync and if you want to use git or mercurial, you must state that explicitly when you dotcloud create or dotcloud connect

If you use a git/mercurial repository you must commit your changes. Any outstanding change will not make it to dotCloud since under the hood, it will use git push/hg push.

Pushing Uncomitted Changes

If you are using git/mercurial but don’t want to commit each time you want to push to dotCloud, just add the “--rsync” option when you push:

dotcloud push --rsync

It will force the uploader to use the “rsync” method, and therefore push all your files.

Excluding Files From the Push

If you are using git or mercurial, you can use their respective “ignore” mechanisms. You can use the following rule of thumb: “if it’s not pushed with git push (respectively hg push), it won’t be pushed by dotcloud push”.

If you are using plain rsync upload, or if you are using git or mercurial together with “--rsync”, you can create a file named “.dotcloudignore” at the root of your code, and list patterns to ignore.

Note

If this file exists, rsync will run with “--exclude-from .dotcloudignore”; so you can use all the funkiness of rsync if you need complex exclusion patterns!

Omitting Code Directory

If you omit the last argument of the push (i.e., if you just do dotcloud push), it will look for a dotcloud.yml file in the current directory. If it cannot be found, it will look in its parent directory, and recursively in all parent directories until a dotcloud.yml file is found. The directory containing the dotcloud.yml will be used as a base for the push. If no dotcloud.yml file can be found, the push will abort.

Note

The --rsync flag and the .dotcloudignore file require to run version 0.9 of the CLI or higher.