Let's say I have this worktree that has already been tracked by git.
.
├── parent
│ ├── child1
│ | └── file1.txt
│ ├── child2
│ | ├── file2.txt
│ | └── grandchild
│ | └── file3.txt
│ ├── somefile.txt
│ └── anotherfile.txt
|
I want to mark every tracked files inside parentso that any changes made to them woudln't be tracked by git anymore, which in the end would include somefile.txt, anotherfile.txt, file1.txt, file2.txt, file3.txt.
.gitignore only works on untracked files so I'm using --skip-worktree.
I tried:
1.
git update-index --skip-worktree parent/
Gave me Ignoring path parent/ but when I check git ls-files -v, it still shows me that the files I want to skip are still tracked.
2.
git update-index --skip-worktree parent/*
It gave me fatal: Unable to mark file parent/child1 so it cannot mark a directory and anything it contains.
How can I do this without manually add every file I have inside parent?