Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gitignore file is ignored #51

Open
amsimms opened this issue Nov 6, 2017 · 5 comments
Open

.gitignore file is ignored #51

amsimms opened this issue Nov 6, 2017 · 5 comments
Assignees
Labels

Comments

@amsimms
Copy link

amsimms commented Nov 6, 2017

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.

@amsimms
Copy link
Author

amsimms commented Jan 24, 2018

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.

@AlexJitianu
Copy link
Collaborator

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.

@AlexJitianu
Copy link
Collaborator

By the way, are you using a wildcard pattern inside .gitignore, like this:
Icons?
Or do you specify it in another way?

@stefan-jung
Copy link

@AlexJitianu, if you need examples of good and valid .gitignore files, you should have a look at gitignore.io.

@AlexJitianu
Copy link
Collaborator

AlexJitianu commented Feb 21, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants