oxygen-git-client-addon
oxygen-git-client-addon copied to clipboard
.gitignore file is ignored
On a Mac, two junk files you shouldn't check in are:
Icon .DS_Store
The Icon one is "special" in that the file name contains a carriage return (i.e. Icon^M), which reduces the possibility of a naming conflict. Right now Icon files show up as being Staged, despite being listed in .gitignore. Since the .DS_store files are not showing up, I suspect the problem is handing special characters in the file name.
Is there any update on this? It would be really great if it got fixed. This is a really useful plugin, but not supporting .gitignore is really problematic as it clutters the staging UX with files we don't want people checking in.
Hi,
I'm sorry for the late reply. Actually, the plugins does support .gitignore but, as you said, something is probably wrong with the carriage return character. I'll have to dig some more to see if the JGIT library (that the plugin relies on) has an issue with these special characters or if its something on the plugin side.
By the way, are you using a wildcard pattern inside .gitignore, like this:
Icons?
Or do you specify it in another way?
@AlexJitianu, if you need examples of good and valid .gitignore files, you should have a look at gitignore.io.
Thanks for the hint, @xephon2. Here is what I've discovered so far.
- I create my own special "Icons\r" file by running this in the command line:
CR=$(echo X |tr X '\r') ls >"Icons${CR}"
- I used gitignore.io to create a file. This file actually contained an Icons\r entry.
The command line git client didn't seem to use it though. It was still showing me the 'Icons\r' file as outgoing.
Afterwards, I've put a wildcard pattern inside .gitignore: Icons? . At this point, the git command line client begun ignoring the file. Oxygen's plugin didn't!
Another pattern: Icons* . Oxygen's plugin finally ignored the file. I know that this pattern might fire on unwanted files, but it was just a test. Or, hopefully, might be an workaround for you, @amsimms?
Any additional hints or ideas are most welcomed.
Alex