git rm

Remove files from the working tree and from the index

Remove files matching pathspec from the index, or from the working tree and the index. The files being removed have to be identical to the tip of the branch, and no updates to their contents can be staged in the index, though that default behavior can be overridden with the -f option. When --cached is given, the staged content has to match either the tip of the branch or the file on disk, allowing the file to be removed from just the index.

How-tos using git rm

Last modified on November 30, 2021.

Can't find a solution to your git problem?

Contact us on githint@githint.com and we will add the solution to the site