class Git::Commands::Rm

Implements the ‘git rm` command

This command removes files from the working tree and from the index.

@example Remove a tracked file

rm = Git::Commands::Rm.new(execution_context)
rm.call('file.txt')

@example Remove multiple files

rm = Git::Commands::Rm.new(execution_context)
rm.call('file1.txt', 'file2.txt')

@example Remove a directory recursively

rm = Git::Commands::Rm.new(execution_context)
rm.call('directory', r: true)

@example Remove from the index only (keep working tree copy)

rm = Git::Commands::Rm.new(execution_context)
rm.call('file.txt', cached: true)

@example Force removal of modified files

rm = Git::Commands::Rm.new(execution_context)
rm.call('modified_file.txt', force: true)

@note ‘arguments` block audited against git-scm.com/docs/git-rm/2.53.0

@see git-scm.com/docs/git-rm git-rm

@see Git::Commands

@api private