Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As of version 2012.1, Perforce supports the <code>P4IGNORE</code> environment variable. This allows you to specify files and directories to ignore when using the commands that search for or add new files (<code>p4 add</code>, <code>p4 status</code>, and <code>p4 reconcile</code>).</p> <p>To use an ignore file, create a file in the root of your workspace and give it some meaningful name. The convention seems to be something like <em>.ignore</em> or <em>.p4ignore</em>, but anything will do (I used <em>p4ignore.txt</em> so that I can edit it with a simple double-click). Then fill it with your ignore rules. The following will ignore the the unwanted debris generated by Visual Studio:</p> <pre> # directories bin obj # files *.suo *.user </pre> <p>After you have created this file, set the <code>P4IGNORE</code> environment variable to point to it. At the command line, type something along the lines of this:</p> <pre><code>p4 set P4IGNORE=C:\somepath\p4ignore.txt </code></pre> <p><strong>Be sure to use an absolute path!</strong> The <a href="http://www.perforce.com/blog/120214/new-20121-p4ignore" rel="noreferrer">Perforce documentation</a> doesn't specify this and my first attempt did not work (on Windows anyway) because I didn't specify an absolute path.</p> <p>After doing this, any attempt to add files or directories that are in the ignore list will be rejected and you'll see a warning such as this (which they do give you the option to suppress):</p> <p><img src="https://i.stack.imgur.com/rOL68.png" alt="P4V &#39;ignored&#39; files message"></p> <hr> <p>If you are using a version of the Perforce server previous to 2012.1, you can still do this in your client spec. The syntax of your exclusion rules is just a little off. What you want is this:</p> <pre> -//depot/Foo.../*.user //Client/Foo.../*.user -//depot/Foo...bin/... //Client/Foo...bin/... -//depot/Foo...obj/... //Client/Foo...obj/... </pre> <p>Note the missing slashes after "Foo" and before "bin" and "obj".</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload