Git - Remove All of a Certain Type of File from the Repository

前端 未结 5 1430
情歌与酒
情歌与酒 2020-12-31 05:54

How do I remove all of a certain type of file from the Repository? I\'m using

git filter-branch --index-filter \'git rm -rf --cached **/*.jar\'
5条回答
  •  失恋的感觉
    2020-12-31 06:30

    You simply have to run this in order to remove all your jars from the index:

    git rm -r --cached **/*.jar
    

    Run this command from your root directory of the project and it will clean up and will remove all your file only from the staging area.

提交回复
热议问题