L
L
lgick2014-04-18 15:03:04
git
lgick, 2014-04-18 15:03:04

.gitignore Ignore everything except individual files

For some reason, it is not possible to make the folder and its contents visible

# сначала все в игнор
*

# исключить из игнора файлик
!file.txt

# исключить из игнора папку с содержимым
!folder/*

Everything is ok with the file - it is visible! And the folder is still ignored. How to make a folder and its contents visible?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
rsludge, 2014-04-18
@rsludge

/*
!file.txt
!/folder/

A
Alexander Wolf, 2014-04-18
@mannaro

Try removing the asterisk after /

N
Nikita22007, 2020-02-16
@Nikita22007

if your files are on the path /a/b/c/d/*
you need to write like this:
*
!a
!a/b
!a/b/c
!a/b/c/d
!a/b/c/d/ *

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question