ich dir Struktur wie dieses:Erlauben Sie nur einige Dateien in Unterordner mit .gitignore
static
admin
ajax_upload
books
css
font
media
robots.txt
templates
src
build
lib
Ich möchte ignorieren folgende direcotories:
- lib
- build
- src
- statisch
Ich möchte erlauben folgende:
- statisch/css/Bootstrap-styled.css
- statisch/css/main.css
- statisch/css/font - * CSS.
- statisch/font
- statisch/media/default.png
- statisch/robots.txt Vorlagen
So verwende ich die folgenden .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
Aber es nicht richtig funktioniert. Kannst du mir helfen? Was mache ich hier falsch? TIA!
Einzelheiten
Echtprojektstruktur ist wie folgt:
static
admin
css
img
js
admin
ajax_upload
books
css
font
media
uploads
blog
gallery
default.png
robots.txt
templates
src
build
lib
nach 'git add statisch /' oder 'git add static' Ich sehe' Die folgenden Pfade von einem Ihrer .gitignore Dateien ignoriert werden : statisch Verwenden Sie -f, wenn Sie sie wirklich hinzufügen möchten. fatal: keine Dateien hinzugefügt – dizpers