memoir/pages/git/remove-from-remote.md

12 lines
256 B
Markdown
Raw Permalink Normal View History

2023-04-03 16:58:30 +00:00
# Remove files from repository
How to remove files from the repository, without deleting them locally. [Original SO](https://stackoverflow.com/a/1143800)
```bash
# File
git rm --cached file_to_remove.txt
# Dir
git rm --cached -r directory_to_remove
```