Remove and ignore all files that have an extension from a git repository

前端 未结 4 1266
深忆病人
深忆病人 2020-12-23 09:54

I\'m working on a django project with a few other developers and we have recently realized that all the .pwc files in our app cause the commits and repository to be cluttere

4条回答
  •  情深已故
    2020-12-23 10:29

    Jefromi's answer will remove them for the present and the future...you could also remove them in the past using git filter-branch. Of course this has some other ramifications, like requiring everyone else working on the repo to re-checkout (and possibly rebase any work they haven't pushed to the main repo). Depends how big the PWC files are, you may want to do this if they are wasting a lot of diskspace in your repo (since every time you clone a git repo, you get every file and every revision)

提交回复
热议问题