How to re-add added files (update staged files only) in git?
<p>We have modified files in <code>path/to/another/</code> and <code>path/to/main/</code>.<br>
Files in <code>path/to/main/</code> already added into git cache but we have updated <code>path/to/main/Bar.php</code> file <strong>AGAIN</strong>. We now have the following situation:</p>

<pre><code>$ git status
[...]
Changes to be committed:
  (use "git reset HEAD &lt;file&gt;..." to unstage)

        modified:   path/to/main/Foo.php
        modified:   path/to/main/Bar.php

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:   path/to/main/Bar.php
        modified:   path/to/another/Aaa.php
        modified:   path/to/another/Bbb.php
</code></pre>

<p>(note that path/to/main/Bar.php shows up twice)</p>

<p>I need a command which could readd files which were added before without using particular paths.</p>

<p>P.S. <code>git add --update</code> will add all these files. It doesn't work.</p>

<p>P.P.S. This command should be able to readd <code>modified:</code> and <code>new file:</code> types.</p>

<p><strong>UPD1</strong></p>

<p>Thanks to @AyonNahiyan, yeah, it can work in bash. But maybe there is a command without using bash tricks (subcommands).</p>