2017-08-11 2 views
1

Ich entwickle einige Quellcodes in ASM, aber ich möchte nicht die Binärdateien und Obj-Dateien speichern, alle Ordner sind ein neues "Projekte", alles ist in Ordnung, aber wenn ich machte einige Änderungen in Ubuntu keine Änderungen vornehmen. Z.B.Git ignorieren alle Dateien mit Ausnahme einiger Dateien in Unterverzeichnissen

/ 
    |- HelloWorld/ 
    |- hello.asm 
    |- hello.o 
    |- hello 
    |- SomeProject/ 
    |- some.asm 
    |- some.o 
    |- some 
    |- CProject/ 
    |- project.c 
    |- project.o 
    |- project 

Mein .gitignore ist:

# Ignore all ASM Binaries 
* 

# Except source codes files in root 
!*.c 
!*.asm 
!*.sh 
!*.gitignore 
!*.md 
!*.txt 
# And source code files in subdirectories 
!**/*.c 
!**/*.asm 
!**/*.sh 
!**/*.gitignore 
!**/*.md 
!**/*.txt 

auch versucht:

!*/*.txt 
!/**/*.txt 
!/*/*.txt 
!**/*.txt 

Antwort

0

gelöst, .gitignore:

# Ignore all files 
* 

# Ignore all files in subdirectories 
#**/** 

# Unignore all with extensions 
!*.* 

# Unignore all files in subdirectories 
/* 
!/*.asm 
!/*.c 
!/*.sh 
!/*.md 
!/*.txt 
!/*/ 
/*/** 

!/**/*.asm 
!/**/*.c 
!/**/*.sh 
!/**/*.md 
!/**/*.txt 

# Except source code files 
!.gitignore 
!*.readme 
!*.c 
!*.asm 
!*.sh 
!*.md 
!*.txt 
Verwandte Themen