Why git-rm is not opposite to git-add?

Viewed 1012

Files can be tracked or untracked. We start to track files by executing "git add".

Now let's assume that we want to stop tracking a file. I would assume that "git rm" is the way to go. My expectation was that by "git rm" we make a file "untracked". However, in reality we remove the file completely. Why? And what should one do to make file just untracked (without removing it).

3 Answers
Related