diff --git a/README.md b/README.md index 6953f6c..d0b0bb6 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Staging Stashes Interactively](git/staging-stashes-interactively.md) - [Stashing Only Unstaged Changes](git/stashing-only-unstaged-changes.md) - [Stashing Untracked Files](git/stashing-untracked-files.md) +- [Untrack A Directory Of Files Without Deleting](git/untrack-a-directory-of-files-without-deleting.md) - [Untrack A File Without Deleting It](git/untrack-a-file-without-deleting-it.md) - [Verbose Commit Message](git/verbose-commit-message.md) - [What Is The Current Branch?](git/what-is-the-current-branch.md) diff --git a/git/untrack-a-directory-of-files-without-deleting.md b/git/untrack-a-directory-of-files-without-deleting.md new file mode 100644 index 0000000..bbb3007 --- /dev/null +++ b/git/untrack-a-directory-of-files-without-deleting.md @@ -0,0 +1,13 @@ +# Untrack A Directory Of Files Without Deleting + +In [Untrack A File Without Deleting It](git/untrack-a-file-without-deleting-it.md), +I explained how a specific file can be removed from tracking without +actually deleting the file from the local file system. The same can be done +for a directory of files that you don't want tracked. Just use the `-r` +flag: + +```bash +$ git rm --cached -r +``` + +[source](http://stackoverflow.com/questions/1143796/remove-a-file-from-a-git-repository-without-deleting-it-from-the-local-filesyste)