P4 - Ignoring Files
To avoid adding and checking in files that do not belong in the repository, you can exclude individual files or file types (for example, build or release artifacts) from source control using Ignore Lists. To learn more, see Exclude Files from P4 Server Control.
You can set the following preferences:
-
Enable Ignore Lists for specifying files to ignore when marking for add: Select to enable P4 for Visual Studio to use Ignore Lists to keep individual files or file types from being added to the P4 Server repository.
If you have already set an Ignore List file as the
P4IGNORE
environment variable on your local machine, that file name appears by default in the Name field. If not, enter a file name or accept the standard default,.p4ignore.txt
. The first time you select Edit Ignore List or Add to Ignore List for a file in a folder in Solution Explorer, P4 for Visual Studio adds an Ignore List file with this file name to that folder.Your local
P4IGNORE
environment variable is updated with the file name that you enter here. If other P4 Server clients (such asp4
or P4V) on your local machine use Ignore List files, be sure to use the same file name as you use with those clients. -
Automatically add new Ignore Lists to solution or project: Select to have new Ignore Lists appear in the Solution Explorer.
If you do not select this option, the Ignore List file will be hidden in Solution Explorer.
-
Prompt when creating a new Ignore List: Select to have P4 for Visual Studio prompt you when you select Add to Ignore List in Solution Explorer to add an Ignore List to a folder that does not yet have one.
If you do not select this option, the system creates the Ignore List without prompting.
- Automatically ignore new Ignore Lists (add Ignore Lists to themselves): Select to have P4 for Visual Studio automatically add the Ignore List file to itself to prevent the Ignore List from being added to the P4 Server depot.
-
Automatically add new Ignore Lists to P4 Server: Select to have P4 for Visual Studio automatically add new Ignore Lists to the P4 Server depot.
This option works only when the Automatically ignore new Ignore Lists (add Ignore Lists to themselves) option is not selected. If that option is not selected, and you do not select the Automatically add new Ignore Lists to P4 option, then you must manually mark the Ignore List file for add to add it to the repository.