title: Ignore new commits for git submodule
body: <h1>Background</h1>
  
  <p>Using Git 1.8.1.1 on Linux. The repository looks as follows:</p>
  
  <pre><code>master
    book
  </code></pre>
  
  <p>The submodule was created as follows:</p>
  
  <pre><code>$ cd /path/to/master
  $ git submodule add https://user@bitbucket.org/user/repo.git book
  </code></pre>
  
  <p>The <code>book</code> submodule is clean:</p>
  
  <pre><code>$ cd /path/to/master/book/
  $ git status
  # On branch master
  nothing to commit, working directory clean
  </code></pre>
  
  <h1>Problem</h1>
  
  <p>The master, on the other hand, shows there are "new commits" for the book submodule:</p>
  
  <pre><code>$ cd /path/to/master/
  $ git status
  # On branch master
  # Changes not staged for commit:
  #   (use "git add &lt;file&gt;..." to update what will be committed)
  #   (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
  #
  #       modified:   book (new commits)
  #
  no changes added to commit (use "git add" and/or "git commit -a")
  </code></pre>
  
  <p>Git should ignore the submodule directory completely, so that the master is also clean:</p>
  
  <pre><code>$ cd /path/to/master/
  $ git status
  # On branch master
  nothing to commit, working directory clean
  </code></pre>
  
  <h1>Failed Attempt #1 - dirty</h1>
  
  <p>Inside the file <code>master/.gitmodules</code> is the following, as per this <a href="https://stackoverflow.com/a/5542452/59087">answer</a>:</p>
  
  <pre><code>[submodule "book"]
          path = book
          url = https://user@bitbucket.org/user/repo.git
          ignore = dirty
  </code></pre>
  
  <h1>Failed Attempt #2 - untracked</h1>
  
  <p>Changed <code>master/.gitmodules</code> to the following, as per this <a href="https://stackoverflow.com/a/5127213/59087">answer</a>:</p>
  
  <pre><code>[submodule "book"]
          path = book
          url = https://user@bitbucket.org/user/repo.git
          ignore = untracked
  </code></pre>
  
  <h1>Failed Attempt #3 - showUntrackedFiles</h1>
  
  <p>Edited <code>master/.git/config</code> to the following, as per this <a href="https://stackoverflow.com/a/4345788/59087">answer</a>:</p>
  
  <pre><code>[status]
     showUntrackedFiles = no
  </code></pre>
  
  <h1>Failed Attempt #4 - ignore</h1>
  
  <p>Added the book directory to the master ignore file:</p>
  
  <pre><code>$ cd /path/to/master/
  $ echo book &gt; .gitignore
  </code></pre>
  
  <h1>Failed Attempt #5 - clone</h1>
  
  <p>Added the book directory to the master as follows:</p>
  
  <pre><code>$ cd /path/to/master/
  $ rm -rf book
  $ git clone https://user@bitbucket.org/user/repo.git book
  </code></pre>
  
  <h1>Question</h1>
  
  <p>How can the <code>book</code> submodule be in its own repository directory under the <code>master</code> repository yet have git ignore the <code>book</code> submodule? That is, the following should not display:</p>
  
  <pre><code>#
  #       modified:   book (new commits)
  #
  </code></pre>
  
  <p>How to suppress that message when executing <code>git status</code> in the master repository?</p>
  
  <p>An article about <a href="http://codingkilledthecat.wordpress.com/2012/04/28/why-your-company-shouldnt-use-git-submodules/" rel="noreferrer">git submodule pitfalls</a> suggests this an inappropriate submodule usage?</p>