title: p4 - how to edit a file that's opened for add or not in client
body: <p>I am new to p4, so some explanations will be much appreciated and more helpful than the answer itself.</p>
  
  <p>I want to edit a file foo.txt. I am in the directory where this file lives.</p>
  
  <p>My attempts to edit foo.txt have been the following:</p>
  
  <pre><code>$p4 sync
  File(s) up-to-date.
  
  $p4 edit foo.txt
  foo.txt - files(s) not on client
  
  $p4 add foo.txt
  //depot/directory/foo.txt#1 - opened for add
  $p4 edit foo.txt
  //depot/directory/foo.txt#1 - can't edit (already opened for add)
  </code></pre>
  
  <p>The fact that there isn't much info on this when Googling this issue indicates that it's probably trivial.</p>