gitignore ignore files within a folder that has whitespace in the middle

GitGithubGitignore

Git Problem Overview


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?

My FolderName/Web.config

I tried to insert the %20 in the middle but that did not help.

Thank you for your help.

Git Solutions


Solution 1 - Git

Try My\ FolderName/Web.config or "My FolderName/Web.config"

Solution 2 - Git

I'm guessing you probably have to use "My FolderName"/Web.config instead.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMaster PageView Question on Stackoverflow
Solution 1 - Gitch3kaView Answer on Stackoverflow
Solution 2 - GitlrAndroidView Answer on Stackoverflow