This is my git status:
# On branch create-views-question
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: solr/data/development/index/_0.fdt
# deleted: solr/data/development/index/_0.fdx
# deleted: solr/data/development/index/_0.fnm
# deleted: solr/data/development/index/_0.frq
...
Currently, i used git rm
to remove one by one file, is there another way so i can remove them same time?
In this case you could do
git rm 'solr/data/development/index/_0.*'
Note the '
marks to prevent shell expansion and instead pass the *
directly to git.
Here's an example:
graphite> git status
# On branch master
# Changes not staged for commit:
# deleted: a
# deleted: b
#
no changes added to commit
graphite> git rm '*'
rm 'a'
rm 'b'
graphite> git status
# On branch master
# Changes to be committed:
# deleted: a
# deleted: b
#
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