Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 745
Master Page Avatar asked Apr 18 '12 16:04

Master Page


People also ask

How do I ignore certain files in git?

If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a . gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.

How do I ignore files while pushing to git repository?

Excluding local files without creating a .Use your favorite text editor to open the file called . git/info/exclude within the root of your Git repository. Any rule you add here will not be checked in, and will only ignore files for your local repository.


1 Answers

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

like image 62
ch3ka Avatar answered Sep 17 '22 13:09

ch3ka