Hedge Hedge - 1 year ago 194
Git Question

.dockerignore all subfolders but not files in the folder itself

I've got a folder structure like below. I want to ignore all subfolders (and all their content) of

but include all files which are directly in
(e.g. FETCH_HEAD and HEAD).

How do I write that in the

├── HEAD
├── description
├── hooks
│   ├── applypatch-msg.sample
│   ├── commit-msg.sample
│   ├── post-update.sample
│   ├── pre-applypatch.sample

qzb qzb
Answer Source

According to documentation you can ignore only subdirectories:


You don't have to manually exclude files which are directly in .git directory.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download