Sublime Forum

SublimeMerge: Ignoring global git config, at least its excludeFiles

#1

I have a global .gitignore so that most things are ignored by default, it doesn’t seem to be picked up by sublime merge. I can see .idea being there to commit but it’s not on any other git client nor git status on the command line.

3 Likes

Sublime Merge lists tracked files as untracked
#2

Can confirm this bug. I have node_modules in my global gitignore but Sublime Merge shows these files as untracked, unlike git cli.

0 Likes

#3

I have .DS_Store inside ~/.gitignore_global

Seems like that isn’t being respected

0 Likes

#4

It looks like it’s a bug in parsing those as folders. Adding a / after the ignored ignored (heh) directories works for me, i.e. tmp/ instead of tmp

0 Likes

#5

Is everyone using the file ~/.gitignore_global? I believe we currently handle ~/.gitignore, but we may not have the global variant. We’ll definitely get it sorted.

0 Likes

#6

Just the normal .gitignore, and yea it appears to ignore most things correctly, just not all folders without a /

0 Likes

#7

Mine is named .gitignore_global (and it’s a symlink as well, if that matters).

0 Likes

#8

I am using ~/.gitignore_global but this is just a configuration on ~/.gitconfig:

[core]
        excludesfile = ~/.gitignore_global

Is sublime merge respecting whats configured on ~/.gitconfig.

Like command defaults and such? I think it also should. Things like:

[pull]
        rebase = preserve
2 Likes

#9

I am using only the repository .gitignore (repository root) and am seeing issues on Windows as well.

The problem could be related to un-ignore rules or mixed-case directory paths in the repository. I haven’t created a repro repo, but this is the general setup:

.gitignore (partial, some surrounding lines as well):

[Bb]in/
!/ext/[Bb]in/
!/ext/[Bb]in/**/*
!/somedir/[Bb]in/
!/somedir/[Bb]in/*
!/ext/src/somedir/[Bb]in/
!/ext/src/somedir/[Bb]in/*
!/somedir/[Bb]in/de/
!/somedir/[Bb]in/de/*

All files under /somedir/Bin/ show up as unstaged (even though git status doesn’t show anything and they are mostly def. not ignored and they are also part of the repo).

Another detail:
It looks like the directory paths for the files in that directory are stored with varying casing in the repo (could be an artifact of an initial svn-to-git conversion).
So there is (among the unstaged list of Sublime Merge):

/somedir/Bin/file1.dll
/somedir/bin/file2.dll
/somedir/Bin/file3.dll
… etc…

Hope this helps

Best
Tobias

0 Likes

#10

Our ignore rule handling is currently case sensitive, there will be a new build out it a day or two that addresses this.

If you have an ignore rule that isn’t working as expected, and it’s not a case issue, please let me know

1 Like

#11

This is my git and symlink config. I added the ~/.gitignore symlink when ~/.gitignore_global didn’t work. Neither of these work for me.

[core]
  excludesfile = /Users/brandoncc/.gitignore_global
/Users/brandoncc/.gitignore_global -> dotfiles/.gitignore_global
/Users/brandoncc/.gitignore -> /Users/brandoncc/.gitignore_global

All of the files that should be ignored are being shown as untracked files.

0 Likes

#12

I’m using a sample .gitignore for Visual studio, (in the local gitignore, not the global one) which includes the following lines:

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
x64/
build/
bld/
[Bb]in/
[Oo]bj/

I’m getting files such as projectFolder/obj/Debug/builtdll.dll showing up as untracked when they shouldn’t (on Windows).

0 Likes

#13

Similar behavior here.

  • My ~/.gitignore is also symlink
  • OSX High Sierra
0 Likes

#14

Just to confirm, we aren’t handling symlinked files correctly when reading ignore rules - this will be fixed as soon as the next build is out

2 Likes

#15

I just checked for updates and found you guys had shipped the fix for the symlink issue already. Everything is working for me now, thanks!

1 Like

#16

nice to see such a quick update

the problem remains for me, though. see details in my previous post/comment further up

best
tobias

0 Likes

#17

Is there any chance you could post debug info from Help > Debug Information using build 1058? Feel free to remove any info you don’t want shared, but primarily I am interested in exactly what state Sublime Merge is seeing those files in.

You mentioned they were unstaged - are they added or modified in the Working Directory section? Or are they listed as untracked?

I tried using build 1058 to recreate similar ignore rules and create some files in such a folder structure, but it seemed to be picking things up properly. That said, I know there is another issue that was reported about the difference between Merge and CLI git at All the files in my repository are shown as new files, so there is obviously something going on.

0 Likes

#18

is there any way i could share the debug information with you privately? please let me know by mail to semantic-at-poolarserver-dot-com

0 Likes

#19

I’ve sent you an email to which you can reply with the Debug Information. Thank you!

0 Likes

#20

I am still having this issue. Is this fixed in a build only available to registered users? Still trying it out before I commit to purchasing it.

0 Likes