pub fn remove_paths(opts: RemoveOptions) -> Result<RemoveResult>Expand description
Remove paths from the index and optionally from the working tree.
§Arguments
opts- Remove options including paths, cached_only, force, and recursive flags.
§Behavior
- Without
cached_only: deletes file from disk, removes from index - With
cached_only: only removes from index (file stays on disk, becomes untracked) - Fails if file has uncommitted changes (unless
forceis set) - With
recursive: removes entire directories