---
title: "How to Ignore Builds - Optimize your Netlify Build Times"
description: "Unnecessary builds can be incredibly wasteful and time consuming. In this post we dive into Netlify"
source: "https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times/"
last_updated: "2026-11-08T01:49:38.000Z"
---
At Netlify, we try hard to optimize your builds by determining how your site has changed at any given update. To save users from the pain of wasted build minutes, Netlify tries to intelligently check for changes in a site’s base directory. It does this by comparing files in last known version to the latest updated version and automagically skips a build if no change is detected. If you’re keen on learning more about how Netlify skips builds, check out [this concise primer on Netlify’s deploy skipping feature](https://www.netlify.com/blog/2019/10/10/intelligent-deploy-skipping-an-automatic-optimisation/)

Though Netlify works hard to prevent unnecessary builds, it doesn’t always know when a build is undesired (like in the case of dependabot version bumps). In cases like these, Netlify offers users control over how and what gets built with the ignore setting in the configuration. With this, users have a more fine-grained control over their site builds and can appropriately ignore any and all unnecessary builds.

Ignoring unnecessary builds and updates is as easy as adding an ignore attribute to your configuration like so:

```
[build]  ignore = “git diff —quiet HEAD^ HEAD sub_dir/“
```

If you’re specifically looking to ignore dependabot updates, you can lean on Git log to surface changes in a commit and ignore the build appropriately like so:

```
[build]  ignore = "git log -1 --pretty=%B | grep dependabot"
```

For reference, an exit-code of 1 indicates the contents have changed, while an exit code of 0 indicates that no relevant changes have been detected. As a result, the former will continue the build per usual while the latter will exit the build and return early.

This process of ignoring builds can be incredibly handy when building fast and helps significantly when it comes to conserving your build minutes. For more tips and tricks on optimizing your deployments, head on over to the [Netlify Community forum](https://community.netlify.com/t/common-issue-how-can-i-optimize-my-netlify-build-time/3907).

### Share

-   [X (fka Twitter) ](https://twitter.com/intent/tweet?text=Ignore unnecessary builds to optimize your build times&url=https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times/)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2020%2F04%2F27%2Fignore-unnecessary-builds-to-optimize-your-build-times%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times/)
-   [Bluesky](https://bsky.app/intent/compose?text=Ignore unnecessary builds to optimize your build times+https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times/)

* * *

### Tags

-   [Build](/blog/tags/build/)
-   [Deployments](/blog/tags/deployments/)

## Keep reading

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials October 10, 2019

[

### Intelligent deploy skipping: An automatic optimisation

](/blog/2019/10/10/intelligent-deploy-skipping-an-automatic-optimisation/)

-   ![Profile picture of Phil Hawksworth](/_astro/9cfe2bbe94bcb555ce3ac7683ac7905ad3fd32b1-400x400_NyfSk.webp)
    
    Phil Hawksworth
    

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials February 25, 2020

[

### Gatsby Build Speed Improvements With Parallel Image Processing

](/blog/2020/02/25/gatsby-build-speed-improvements-with-parallel-image-processing/)

-   ![Profile picture of Jason Lengstorf](/_astro/11b8e51d90b26838de71904294430279b7099995-700x700_Z1fNijm.webp)
    
    Jason Lengstorf
    

## Recent posts

News & Announcements September 29, 2026

[

### 5x faster Edge Functions: v8 isolates to Unikraft MicroVMs

](/blog/edge-functions-firecracker-microvms/)

-   Jake Champion
    
-   ![Profile picture of Aarthy Chandrasekhar](/images/people/aarthy-chandrasekhar.jpg)
    
    Aarthy Chandrasekhar
    
-   ![Profile picture of Ivan Zarea](/_astro/451968a8e873f95cf69c7edd78eb29a9035541eb-1024x1024_2wyTXf.webp)
    
    Ivan Zarea
    

Opinions & Insights September 22, 2026

[

### How we built Git storage for millions of Netlify projects

](/blog/how-we-built-git-storage-for-millions/)

-   ![Profile picture of Philippe Serhal](/_astro/795792fe4d14648b1b96285e46426ed964b802d7-512x512_Z23ebKb.webp)
    
    Philippe Serhal
    

Tools & Services September 10, 2026

[

### Cursor Origin repositories build, preview, and deploy on Netlify

](/blog/cursor-origin-repositories-on-netlify/)

-   ![Profile picture of Gehrig Kunz](/_astro/b4e9f58d914d1334ea70d53ea55a1f26b26f1445-512x512_Z202edR.webp)
    
    Gehrig Kunz
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_nzSVh.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)