What's the Best WordPress Git Deployment Tool

Using the EB CLI with Git

The EB CLI provides integration with Git. This section provides an overview of using Git with the EB CLI.

Here's how to install Git and initialize your Git repository

  1. Download the latest version of Git from http://git-scm.com.

  2. Initialize your Git repository by entering the following command:

    EB CLI will now recognize that your application was set up with Git.

  3. If you eb init haven't done yet, do this now:

Mapping Git branches to Elastic Beanstalk environments

You can assign each branch of your code to a different environment. When you complete a branch, changes are made available to the associated environment. For example, you could enter the following to map your production environment to your main branch and a separate development environment to your development branch:

Post changes

By default, the EB CLI provides the latest commit in the current branch, using the commit ID and message as the application version label and description, respectively. If you want to deploy uncommitted to your environment, you can use the option to deploy changes that have been added to the staging area.

How to deploy changes without committing

  1. Add new and changed files to the staging area:

  2. Deploy cached changes with eb deploy:

If you've configured the EB CLI to deploy an artifact and you don't deploy the artifact to your git repository, use the option to deploy the latest build.

Using Git submodules

Some code projects benefit from having Git submodule repositories within the top-level repository. If you use the eb create or eb deploy the EB CLI can add submodules to the application version zip file and upload them with the rest of the code.

You can control the inclusion of submodules by using the option in the EB CLI configuration file section in your project folder.

To include the submodules, set this option to:

If the option is missing or set to, EB CLI does not include any submodules in the uploaded ZIP file.

For more information on Git submodules, see Git Tools - Submodules.

If you eb init to configure your project, the EB CLI adds the option and sets it to. This will ensure that any submodules you have in your project are included in your deployments.

The EB CLI did not always support the inclusion of submodules. In order to prevent accidental and undesired changes to previously existing projects, we have added submodule support. The EB CLI does not include any submodules if the option is missing. If you have one of these existing projects and you want to include submodules in your deployments, add the option and set it to as explained in this section.

The integration of Elastic Beanstalk with CodeCommit does not currently support submodules. If you have enabled your environment to integrate with CodeCommit, submodules will not be included in your deployments.

Assign Git tags to your application version

You can use a Git tag as a version label to identify which version of the application is running in your environment. For example, enter: