Back to skills
SKILL.md
For Tracked Files Use Git Rm
ASecuritySub-skill of repo-cleanup: For Tracked Files (Use git rm) (+2).
- 17 stars
- 0 votes
- 0 copies
- 3 views
- Added September 9, 2026
Security analysis
93/100- Performs destructive filesystem operations
npx -y skills add vamseeachanta/workspace-hub --skill for-tracked-files-use-git-rm --agent claude-codeAre you the author of For Tracked Files Use Git Rm?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-for-tracked-files-use-git-rm)---
name: repo-cleanup-for-tracked-files-use-git-rm
description: 'Sub-skill of repo-cleanup: For Tracked Files (Use git rm) (+2).'
version: 2.2.0
category: _internal
type: reference
scripts_exempt: true
---
# For Tracked Files (Use git rm) (+2)
## For Tracked Files (Use git rm)
```bash
# Remove tracked file
git rm path/to/file
# Remove tracked directory
git rm -r path/to/directory
# Remove from git but keep local copy
git rm --cached path/to/file
```
## For Untracked Files (Use rm)
```bash
# Remove untracked file
rm path/to/file
# Remove untracked directory
rm -rf path/to/directory
# Interactive removal (safer)
rm -i path/to/file
```
## Dry Run First
```bash
# Preview what would be deleted
git clean -n -d
# Preview including ignored files
git clean -n -d -x
```
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.