I have dir structure like this:
static
admin
ajax_upload
books
css
font
media
robots.txt
templates
src
build
lib
I want to ignore following direcotories:
I want to allow following:
So I use the following .gitignore:
# Ignore
/lib
/src
/build
/static/*
# Allow
!/static/css/bootstrap-styled.css
!/static/css/main.css
!/static/css/font-*.css
!/static/font
!/static/media/default.png
!/static/robots.txt
But it doesn't work properly. Could you help me - what I do wrong here? TIA!
Details
Real project structure is like this:
static
admin
css
img
js
admin
ajax_upload
books
css
font
media
uploads
blog
gallery
default.png
robots.txt
templates
src
build
lib
So, the .gitignore works for me is the following:
# Ignore
lib/
src/
build/
static/**/*
# Allow
!static/css/bootstrap-styled.css
!static/css/main.css
!static/css/font-*.css
!static/font/*
!static/media/default.png
!static/robots.txt