title: When do I need to run "git pull --all"?
body: <p>In order to know when I need to run <code>git pull --all</code> I run <code>git rev-parse origin/&lt;branch name&gt;</code> and <code>git ls-remote | grep &lt;branch name&gt;</code> if the SHA of the branch I got from rev-parse is different from the the SHA I got from ls-remote I know that I need to run <code>git pull --all</code>.</p>
  
  <p>Today, I saw a problem with this idea, after I added a new branch to the git repository and run <code>git rev-parse origin/&lt;new branch name&gt;</code> I got <code>unknown revision or path not in the working tree</code>. Any idea how to know when I need to run <code>git pull --all</code> and support the case when I add new branches? In short, how to know if a new branch was add to the git repository?</p>