From 2deaf804da68827864a49569b440de6b976551d2 Mon Sep 17 00:00:00 2001 From: Nicco Date: Mon, 3 Apr 2023 18:58:30 +0200 Subject: [PATCH] Create remove-from-remote.md --- pages/git/remove-from-remote.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pages/git/remove-from-remote.md diff --git a/pages/git/remove-from-remote.md b/pages/git/remove-from-remote.md new file mode 100644 index 0000000..92c3746 --- /dev/null +++ b/pages/git/remove-from-remote.md @@ -0,0 +1,11 @@ +# 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 +```