git - gitignore everything except a symlink -


i have following folder structure:

node_modules/   my_symlink_to_lib   folder_a/   folder_b/ lib/   (some files here) 

i want ignore inside node_modules except symlink:

# doesn't work node_modules/* !node_modules/my_symlink_to_lib  # doesn't work node_modules/* !node_modules/my_symlink_to_lib !node_modules/my_symlink_to_lib/* 

i have tried several other stuff, node_modules/my_symlink_to_lib doesn't end in untracked files.

any ideas?

make sure don't have following in .gitignore_global file:

# ignores whole folder negation won't work in local .gitignore node_modules 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -