---
title: Skipping tasks
description: Never do the same work twice.
product: turborepo
type: guide
summary: Use turbo-ignore to skip CI tasks entirely when a workspace has no relevant code changes.
prerequisites:
  - /docs/crafting-your-repository/caching
related:
  - /docs/guides/ci-vendors
  - /docs/guides/ci-vendors/vercel
---

# Skipping tasks

[Caching](/docs/crafting-your-repository/caching) dramatically speeds up your tasks - but you may be able to go even faster by using `npx turbo-ignore`. If a workspace is unaffected by your code changes, you can completely skip executing a task altogether.

Let's say you want to skip the unit tests for your `web` workspace when there aren't any changes to your `web` application (or its package dependencies). If you are already using [Remote Caching](https://turborepo.dev/docs/core-concepts/remote-caching), you will probably get a cache hit - but you would still spend time provisioning the CI container, installing `npm` dependencies, and other things that can take a while.

Ideally, you would do a quick check to see if any of that work needs to happen in the first place.

***

After you've checked out the repo, but **before** any other work, you can take a few seconds to check that your `web` tests have changed since the parent commit.

```bash title="Terminal"
npx turbo-ignore web --task=test
```

This command will:

1. Filter for the `web` workspace.
2. Create the `dry` output for your `test` task compared to your parent commit.
3. Parse the output to determine which packages have changed.
4. Exit with a `1` code if changes are detected. Otherwise, exits with a `0`.

While you may have been able to hit a `>>> FULL TURBO` cache for this task, you just saved time with all of the other setup tasks required to run your CI.

Using turbo-ignore [#using-turbo-ignore]

To skip unaffected work, first ensure that your Git history is available on the machine. Then, run `npx turbo-ignore`.

`turbo-ignore` uses a combination of the `--filter` and `--dry=json` flags to find changes from the parent commit to the current commit to identify affected packages. By default, `turbo-ignore` finds the difference for the **build task in the current working directory**, but you can [customize this behavior with flags](#customizing-behavior).

Here's an example of the command that will be built and run:

```bash title="Terminal"
npx turbo run build --filter=@example/web...3c8387ffd98b751305fe3f0284befdd00cbd4610 --dry=json
```

Note that a dry run does not *execute* the build task. Instead, it checks your packages to see if your code changes will affect your build (or other task) in only a few seconds.

If `turbo-ignore` finds that the task can be skipped, it will exit the process with a `0` code. If changes have been found, the process will exit with `1`.

<Callout type="info">
  On Vercel, the previously deployed SHA will be used instead of the parent
  commit.
</Callout>

Customizing behavior [#customizing-behavior]

To specify a workspace, you can add it to your command like:

```bash title="Terminal"
npx turbo-ignore web
```

where `web` is your workspace's name running the default `build` task.

If you'd like to change the task, use the `--task` flag to specify the task for the command that `turbo-ignore` will invoke.

Using turbo-ignore on Vercel [#using-turbo-ignore-on-vercel]

To use `npx turbo-ignore` on Vercel, you can use the [Ignored Build Step](https://vercel.com/docs/concepts/projects/overview#ignored-build-step) feature. Vercel will automatically infer the correct arguments to successfully run `turbo-ignore`.

Customizing behavior [#customizing-behavior-1]

When not on Vercel, specify a commit for comparison using the `--fallback` flag.

On Vercel, you can specify the `--fallback` flag to give Vercel a git ref to compare against when the default comparison is not available. By default, Vercel compares to the most recently deployed SHA so this is useful for use cases like avoiding a deploy for the first commit to a branch.

---

[View full sitemap](/sitemap.md)