Plotly uses Git to manage Dash App deployments.
This section serves as a reference for what git commands are utilized,
when to use them, and why.
If you have created a new folder for your Dash App, or have an existing
folder on your local machine, you need to initialize a local Git
repository before you can deploy your Dash App to the Dash Enterprise.
You need to initialize the local Git repository from your app’s
root folder, thus:
If you have an existing repository hosted on Github, or would like to
utilize one the demo Dash Apps from Plotly’s Gallery, then you
you’ll need to clone the repository. You can achieve this by using the
git clone command:
Once you have initialized your local Git repository or cloned an existing
repository from Github, you need to create a remote repository on the
Dash Enterprise, which you will deploy your changes to.
Note that this remote repository will be your live / production Dash App.
To create a remote repository
To view all remotes:
To rename a remote repository:
To remove a remote repository:
By default, Dash apps run on
localhost - you can only access them on
your local machine. To share a Dash app, you need to “deploy” your Dash app
to the Dash Enterprise platform. This can be achieved via a series of
git statusallows you to view which files have been changed.
git diffprints out changes within the files.
git add .will add all your changes.
git commit -m "a description of the changes"will commit you changes.
git push <repository-name> masterwill deploy your code to
The demonstration below is a common way to deploy your changes:
If you want to try out a new feature or test something different with your
Dash App but don’t want to alter your
master code, you can create a
branch to encapsulate these changes.
To view all branches:
To create a new branch:
Once you’ve created a new branch, you need to check it out (i.e. navigate
If you have created a new branch and are happy with the changes, you can
add and commit these changes using the common
git add . and
git commit -m "description" commands. To deploy these to Dash Enterprise,
you will need to deploy the branch into master:
To rename a branch:
If you no longer require the branch, you can remove a branch:
For more information regarding version control and Git commands, see Git’s