How to .gitignore files recursively

前端 未结 4 1401
太阳男子
太阳男子 2020-12-12 23:17

I\'m trying to avoid the following pattern in my .gitignore file.

MyPrject/WebApp/Scripts/special/*.js
MyPrject/WebApp/Scripts/special/*/*.js
My         


        
4条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 00:04

    As of git 1.8.2, this:

    MyPrject/WebApp/Scripts/special/**/*.js
    

    Should work according to this answer. It also works for me in Windows 7 using Sourcetree 1.6.12.0 and the version of git that it installs (1.8.4-preview20130916).

    To gitignore every file and folder under a directory recursively:

    MyPrject/WebApp/Scripts/special/**
    

提交回复
热议问题