列入忽略文件夹中的白名单文件夹 [英] Whitelist folder inside ignored folder
本文介绍了列入忽略文件夹中的白名单文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有一些node_modules的node.js项目.现在,一个node_module达不到预期的效果,我手动更改,编译并将其放回node_module文件夹.
I have a node.js project with some node_modules. Now a node_module was not upto expectations and I manually changed, compiled and put it back into the node_module folder.
我想将此模块添加到GIT中,但是node_modules列在了我的gitignore中(很明显).
I want to add this module to the GIT, however, the node_modules are listed in my gitignore (obviously).
我尝试了以下
/node_modules
!/node_modules/the_module/**
/node_modules
!/node_modules/the_module/**
但是执行git status
是否可以将一个软件包列入一个被忽略的文件夹的白名单?
Is it possible to whitelist one package inside a ignored folder?
推荐答案
好吧,基本上答案是:
/node_modules/*
!/node_modules/the_module
这篇关于列入忽略文件夹中的白名单文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文