Make .gitignore ignore everything except a few files

前端 未结 23 2911
无人共我
无人共我 2020-11-22 00:14

I understand that a .gitignore file cloaks specified files from Git\'s version control. I have a project (LaTeX) that generates lots of extra files (.auth, .dvi, .pdf, logs,

23条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 00:43

    To exclude folder from .gitignore, the following can be done.

    !app/
    
    app/*
    !app/bower_components/
    
    app/bower_components/*
    !app/bower_components/highcharts/
    

    This will ignore all files/subfolders inside bower_components except for /highcharts.

提交回复
热议问题