How to provide file pattern rather a particular file in git-update-index --remove
command?
Using the git rm –cached Command We've mentioned that git rm FILE will remove files from the index and local working tree by default. However, the git rm command provides the –cached option to allow us only to remove files from the repository's index and keep the local file untouched.
In order to set "assume unchanged" bit, use --assume-unchanged option. To unset, use --no-assume-unchanged .
We use git update-index when we want to manually operate on files in Git staging area. This command supports two options that are often misused: –assume-unchanged and –skip-worktree.
Something like
git update-index --remove -- $(git ls-files '*.c')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With