title: When do I need to do "git pull", before or after "git add, git commit"?
body: <p>What is the right way?</p>
  
  <pre><code>git add foo.js
  git commit foo.js -m "commit"
  git pull
  git push
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>git pull
  git add foo.js
  git commit foo.js -m "commit"
  git push
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>git add foo.js
  git pull
  git commit foo.js -m "commit"
  git push
  </code></pre>
  
  <p><strong>UPD:</strong></p>
  
  <p>I forgot to mention that in this case I use <code>git add</code> to stage a <em>tracked</em> and <em>modified</em> file. Not to include a brand new file to repository. Does this changes an order of commands?</p>