Git ignore dir but unignore files in dir -
yes, duplicate question. answers far not working me. i'm running git v 2.6.4 on osx.
here's .gitignore
:
/src/artwork/dist /dist/* !/dist/dandelion.yml
for line 2, i've tried /dist/**
, running git status
still not show /dist/dandelion.yml
.
note /dist
git repo, , i'd avoid using git add -f
if have to. me forcing means you're doing wrong.
why not adding .gitignore
each folder want include file. since have multiple dist folders should place .gitignore
specific rules per folder.
if understood correctly folder structure:
| |-dist . . |-src |- artwork |- dist
what have done far:
# ignore dist folder under src/artwork /src/artwork/dist # ignore dist folder under root folder /dist/* # not ignore dandelion.yml under root/dist folder !/dist/dandelion.yml
note /dist git repo,
why not adding submodule? save need add desired files .gitignore
& make more sense if inner repo.
Comments
Post a Comment