Github Desktop | Cannot add [bob] to .gitignore #22199
-
Hi, First time posting on here. I’m looking on help with github desktop, Just trying to create a .gitignore on a file “resource/[bob]/” and it seems to not be working but for “db/” it does work, Any suggestions? I can’t change the name of the folder btw. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Anything enclosed in square brackets will be interpreted as range notation, as described in the gitignore pattern format documentation. So
|
Beta Was this translation helpful? Give feedback.
-
Seems to not work, I was looking into pattern format but I have not got that far. That did not work what should I do now? |
Beta Was this translation helpful? Give feedback.
-
Hm, I wonder if that has anything to do with you working on Windows, where the backslash can also be a directory separator? Not sure. Maybe try using this:
The |
Beta Was this translation helpful? Give feedback.
-
I have found out with that info, That did not work but just messing around with it Thanks! |
Beta Was this translation helpful? Give feedback.
Hm, I wonder if that has anything to do with you working on Windows, where the backslash can also be a directory separator? Not sure.
Maybe try using this:
The
?
matches any character other than/
, if you don’t have any other directories that match (e.g.resource/abobc/
) it should work.