git gitignore 忽略中间有空格的文件夹中的文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10213653/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
gitignore ignore files within a folder that has whitespace in the middle
提问by Master Page
I have a folder that have a space in the middle, but have a webconfig file inside it. I want git to ignore the webconfig file but somehow it's not ignoring it because of the space in the folder. Anybody know how to work around this?
我有一个文件夹,中间有一个空格,但里面有一个 webconfig 文件。我希望 git 忽略 webconfig 文件,但由于文件夹中的空间,它并没有忽略它。有人知道如何解决这个问题吗?
My FolderName/Web.config
I tried to insert the %20
in the middle but that did not help.
我试图%20
在中间插入 ,但这没有帮助。
Thank you for your help.
感谢您的帮助。
回答by ch3ka
Try My\ FolderName/Web.config
or "My FolderName/Web.config"
尝试My\ FolderName/Web.config
或"My FolderName/Web.config"
回答by lrAndroid
I'm guessing you probably have to use "My FolderName"/Web.config
instead.
我猜你可能不得不"My FolderName"/Web.config
改用。