Sublime Forum

SublimeMerge: Ignoring global git config, at least its excludeFiles

#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

#21

For now the dev builds are available to everyone whether they have a license or not, so you should be able to give it a try. There have been some changes in recent builds regarding the git config file, so possibly this may be fixed now.

0 Likes

#22

It’s still not working for me. My global gitignore is located in:

~/.config/git/ignore

It is the default location for global ignore file according to this:

https://git-scm.com/docs/gitignore

It is a symlink if that matters.

0 Likes

#23

This was fixed in dev build 1063, and the fix is now in stable build 1065

1 Like

#24

It works correctly now. Thanks!

0 Likes

#25

I’m having the same issue on the latest build or the dev build 1085. SM is listing untracked files that are not shown when executing git status in the terminal.
In my ~/.gitignore I ignore .history

=== Git Status Information ===

=== Our Status Information ===
?? .history/.gitignore_20181005155834

When I try to delete or stage them via SM interface I get an error telling me that the following paths are ignored by one of your .gitignore.

0 Likes

#26

@towane If you can create an issue at https://github.com/sublimehq/sublime_merge/issues, and include a couple of other details, such as your platform and the full Debug Information output, then we’ll be able to get it sorted.

0 Likes

#27

Thanks!
Here is the link, in case someone else wants to track the progress of this issue https://github.com/sublimehq/sublime_merge/issues/222

0 Likes