kattunga
(Kattunga)
July 17, 2014, 4:52pm
1
Hi, I have a big repository where I need to exclude exactly one directory.
To illustrate it, in the following example I need to exclude temp images but not template images:
/folder/subfolder1/temp/images
/folder/subfolder1/templates/images
How should I set it in .stignore? I try writing the full path but it doesn’t work.
With best regards
Christian
calmh
(Jakob Borg)
July 18, 2014, 9:40am
2
Create an ignore file containing the line images
in /folder/subfolder1/temp
.
Edit: folder patterns should probably be supported in the ignore file, but they are currently not. Hence, temp/images
in an ignore file won’t work.
If I understand you right there is no explicit folder notation in stignore?
‘picture’ would ignore the folder picture as well as the file picture.jpg, right?
calmh
(Jakob Borg)
June 2, 2015, 12:18pm
4
This thread is out of date and the answer isn’t valid any more - that’s the danger of digging up year old threads for a quickly evolving software.
The correct answer to the original question today is “Put /folder/subfolder1/temp/images
in .stignore
.”
Putting picture
in the .stignore
(which lives at the root of the folder) matches only picture
not picture.jpg
nor picture-something-else
.
1 Like
Hence “picture” would match file “picture” as well as folder “picture”, right?
calmh
(Jakob Borg)
June 3, 2015, 12:49pm
6
Yes, but if you actually use a path as suggested above that situation is impossible.