When should I use rm, git rm, git rm --cached, git add
<p>I am learning git, but I am confused by different ways of staging and committing files. To wrap my head around this I’m using a metaphor of directories: working directory, staging directory, commit directory.</p>

<ul>
<li>If I <code>rm</code> a file from my working directory, it only removes it <em>only</em> from my working directory. It that correct?</li>
<li>If I <code>git rm</code> a file from my working directory, it removes it from all
three directories. Correct?</li>
<li>If I <code>git rm --cached</code> a file, it is removes the file from my staged
and commit directories, but leave it in my working directory?</li>
<li>If I have updated, added, and deleted files from my working
directory, and do <code>git add .</code>, then <code>git status</code> shows staged files that have
been added, deleted, and updated. What happens when I commit? Are the
deleted files removed from the Commit directory? If I roll back to
that commit later, will those deleted files reappear?</li>
</ul>

<p>Any help to better understand these concepts would be appreciated -thanks!</p>