Incremental Git repository deployment.
Clone or download
Latest commit 3127c6f Jul 3, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Added CLI interface Feb 26, 2014
lib v0.5.3 Jan 20, 2018
spec Force symlinks to be preserved Jul 20, 2016
.gitignore Added .ruby-version to .gitignore Oct 15, 2013
.rspec Starting rewrite using rugged gem Feb 25, 2014
.travis.yml Added Ruby 2.2.3 to CI Oct 5, 2015
Gemfile Setup TravisCI Mar 1, 2014
LICENSE Update LICENSE Mar 1, 2014 Update Jul 3, 2018
Rakefile Starting rewrite using rugged gem Feb 25, 2014
dandelion.gemspec update rugged to 0.26.0 Nov 25, 2017


Gem Version Build Status Code Climate

Incremental Git repository deployment.


Ensure that Ruby >= 2.0.0 is installed, then run:

$ gem install dandelion

You may need to install pkg-config and cmake before installing Dandelion. They're likely available in your OS package manager. For example:

$ brew install pkg-config cmake


$ apt-get install pkg-config cmake

You may also need to install the Ruby headers if you're using a version of Ruby installed by your OS package manager (ruby-dev on Debian, ruby-all-dev on Ubuntu).


Configuration options are specified in a YAML file (by default, the root of your Git repository is searched for a file named dandelion.yml).


adapter: sftp
username: user
password: pass
path: path/to/deployment

    - .gitignore
    - dandelion.yml
    - dir/

    - config/auth.yml


  • adapter (alias: scheme, the file transfer adapter)


  • path (relative path from root of remote file tree, defaults to the root)
  • local_path (relative path from root of local repository, defaults to repository root)
  • exclude (list of files or directories to exclude from deployment, if local_path is set files are relative to that path)
  • additional (additional list of files from your working directory that will be deployed)
  • revision_file (remote file in which revision SHA is stored, defaults to .revision)

The additional section can either take a list of local file names or key-value formats if you want to upload something to a specific path:

    - localdir: remotedir
    - file.txt: remotedir/file.txt

The localdir in this example is relative to the repository root (ignoring local_path if you set it).

Each adapter also has additional required and optional configuration parameters (see below). Note that you can dynamically set configuration values by using environment variables. For example:

password: <%= ENV['DANDELION_PASSWORD'] %>


There is support for multiple backend file transfer adapters. The configuration must specify one of these adapters and the set of additional parameters required by the given adapter.

SFTP: adapter: sftp (honors SSH config files)


  • host
  • username
  • password (not required if you're using an SSH key)


  • port (defaults to 22)
  • preserve_permissions (defaults to true)

FTP: adapter: ftp


  • host
  • username
  • password


  • port (defaults to 21)
  • passive (defaults to false)

FTPS: adapter: ftps (ftp over TLS, based on DoubleBagFTPS and Dandelions native FTP adapter)

Required: (same as FTP)

  • host
  • username
  • password

Optional: (in addition to options for FTP)

  • port
  • passive
  • auth_tls (default false)
  • ftps_implicit (default false: explicit TLS)
  • insecure (default false, true to allow self-signed certificates)

Amazon S3: adapter: s3


  • access_key_id
  • secret_access_key
  • bucket_name
  • host (one of the endpoints listed here, defaults to


  • preserve_permissions (defaults to true)
  • cache_control (time to cache content in seconds, e.g. '1296000')
  • expires (time to cache content in seconds, e.g. '1296000')


From within your Git repository, run:

$ dandelion deploy

This will deploy the local HEAD revision to the location specified in the config file. Dandelion keeps track of the currently deployed revision so that only files which have been added/changed/deleted need to be transferred.

You can specify the revision you wish to deploy and Dandelion will determine which files need to be transferred:

$ dandelion deploy <revision>

For a more complete summary of usage options, run:

$ dandelion -h
Usage: dandelion [options] <command> [<args>]
    -v, --version                    Display the current version
    -h, --help                       Display this screen
        --repo=[REPO]                Use the given repository
        --config=[CONFIG]            Use the given configuration file

Available commands:

Note that when specifying the repository or configuration file, the given paths are relative to the current working directory (not the repository root).

To see the options for a particular command, run dandelion <command> -h:

$ dandelion deploy -h
Usage: dandelion deploy [options] [<revision>]
        --dry-run                    Show what would have been deployed