You may occasionally find that the LookML you see in Looker's production mode doesn't match the LookML on the master branch of your Git repository. This most commonly occurs for one of the following reasons:
- Pull Requests are enabled on the repository
- The LookML has been edited somewhere outside of Looker's development environment, like:
- the Git repository itself
- another instance of Looker, like a staging instance
You can get Looker's production branch in sync with the repository's master branch. Open a new tab and type in a URL following this format:
[hostname] with your Looker URL, which is probably in a format like
[project name] with the name of the project you want to sync.
After you run this URL, a white screen with a success message will appear:
Now, your production mode in Looker has been updated to reflect your remote master branch. Your personal developer branch and shared branches are unaffected.
Many Git providers can hit webhooks like this one after every commit, or based on other events you define. This can help automate the process of keeping Looker in sync.
If your Looker project is integrated with pull requests, the Git deploy webhook was most likely set up as part of the process of configuring the project with pull requests.
If not, you can add the git deploy webhook by doing the following:
- From your project, select Project Settings from the Git drop-down menu.
- From the Git Integration section, copy the webhook information and paste it to a text file to use later in this procedure.
Next, use your Git provider's interface to create a trigger for the webhook. Here's an example using GitHub:
- Navigate to your project's repository settings on your Git provider's website.
- In your repository's settings, click on Webhooks.
- Click Add webhook. This will open the Add webhooks window.
- In the Payload URL text box, paste the webhook information you copied from the Git Integration section in Looker.
- Select the option for Just the push event.
- Click Add webhook.
See this documentation page for further information on setting up the deploy webhook.
As of Looker 5.20, you can require a webhook deploy secret for pushing changes from your master branch to your production branch.