I am trying to make it so we can create list views in scratch orgs that will not be pulled into our source when developing. I have created a .forceignore file in the root directory.

enter image description here

My .forceignore file looks like

# Ignore List Views

But when I create a new listView for the Product2 object and do a force:source:pull the listView is not ignored and it gets added to the source. Does anyone see anything wrong with how I am doing it or am I missing something?

2 Answers 2


This had me stumped for a while too... and with some trial and error I was able to get this working (for the scenario of ignoring all list views for Contact).


The .forceignore actually has 2 sets of syntax, 1 for ignoring when pushing, and another for ignoring when pulling. This is kinda mentioned in the docs, but it's not overly obvious, and a key thing is trying to get the right case to use as it's case sensitive (and not aligned to the Type that gets listed in a status command.

  • *.listView also works, thank you.
    – scottdev
    Feb 20, 2021 at 0:44
  • Surelt *.listView works as a wildcard, and hence doesn't answer the OP's question, which was about specific listViews. Feb 22, 2021 at 9:16

With some help from this closed GitHub issue in the forcedotcom repository, the below should also work for what you need:

  • **/Product2/listViews/**
  • **/Account/listViews/**

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .