Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing file pattern with git-update-index --remove

Tags:

git

How to provide file pattern rather a particular file in git-update-index --remove command?

like image 224
kaychaks Avatar asked May 15 '09 12:05

kaychaks


People also ask

How do I remove a file from git without removing it from file system?

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.

How do you undo an assume unchanged?

In order to set "assume unchanged" bit, use --assume-unchanged option. To unset, use --no-assume-unchanged .

What is git update index?

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.


1 Answers

Something like

git update-index --remove -- $(git ls-files '*.c')
like image 200
araqnid Avatar answered Nov 06 '22 11:11

araqnid