---
title: "How to skip a deployment via commit message?"
url: "https://ploi.io/documentation/deployment/how-to-skip-a-deployment-via-commit-message"
published: "2020-11-10"
last_updated: "2022-01-06"
---

# How to skip a deployment via commit message?

You can use the **{COMMIT\_MESSAGE}** deploy script variable to do some magic inside your deploy script. For example, skipping deployments can be done easily with this.

An example to skip a deployment:

```
if [[ {COMMIT_MESSAGE} =~ "skip-deployment" ]]; then
    echo "Skipping deployment upon commit message request."
    exit 0
fi
```

You can even step it up a notch, flush the FastCGI cache when you add a specific word in the commit message:

```
if [[ {COMMIT_MESSAGE} =~ "flush-fastcgi" ]]; then
    {FLUSH_FASTCGI_CACHE}
fi
```

Additionally, you might have setup notifications that you do not want to notify in this case. We have a deploy script variable for that as well. Use the deploy script variable **{DO\_NOT\_NOTIFY}** inside your if statement to skip notifications.

An example:

```
if [[ {COMMIT_MESSAGE} =~ "skip-deployment" ]]; then
    echo "Skipping deployment upon commit message request."
    {DO_NOT_NOTIFY}
    exit 0
fi
```

Make sure to put the **{DO\_NOT\_NOTIFY}** variable **before** you exit the script.