Git ignoring all minified suffixed files

前端 未结 3 1639
逝去的感伤
逝去的感伤 2021-01-17 09:53

I currently have something like:

javascripts/
    plugin.js
    plugin.min.js

stylesheets/
    style.css
    style.min.css

How would I get

相关标签:
3条回答
  • 2021-01-17 10:21

    just having this in the gitignore should work

    *.min.*
    
    0 讨论(0)
  • 2021-01-17 10:24

    You have several solutions, depending of what you really need.

    Ignore all minified files in your project :

    *.min.*
    

    Ignore all minified files in a folder :

    assets/*.min.*
    

    Ignore only JS/CSS minified files in your project :

    *.min.js
    *.min.css
    
    0 讨论(0)
  • 2021-01-17 10:34

    I believe you have to git rm filename --cached to remove the files from your git repo if you added it to .gitignore afterwards. (note: this will remove it from the repo, not from directory)

    0 讨论(0)
提交回复
热议问题