I recently installed SourceTree on a new Win10 laptop and noticed SourceTree wasn't using my global .gitignore file. I wasted a couple hours trying to get it working. It looks like a bug under the options page. The first item at the top of the page is "allow SourceTree to modify your global Git config files" and I verified that this was enabled but I noticed that when I changed the path for the "Global Ignore List" in the SourceTree options that my "c:\users\ssmith\.gitconfig" didn't have the updated excludesfile path. It was still listed as "~/.gitignore". After trying a bunch of different ideas, I finally unchecked the "allow SourceTree to modify your global Git config files" option, restarted SourceTree, then checked it again. And then I set the path for the "Global Ignore List" in the SourceTreeoptions again. After that, my global .gitignore started working. Also, I noticed that the excludesfile path in my "c:\users\ssmith\.gitconfig" was now set to "C:\\Users\\ssmith\\.gitignore" instead of "~/.gitignore". So in summary, it looks like SourceTree might not be correctly reading the "allow SourceTree to modify your global Git config files" option. So unchecking it and checking it again might signal SourceTree that you really, really want to enable this option.
I can, yes. If I use git on the command line, the gitignore is being evaluated as it should be. I also noticed that his gitconfig-file is not being written with changes, e.g. if he changes the filename of his global gitignore-file... Don't know if those two issues are being related.
I'm seeing exactly the same problem. SourceTree used to pick up the global .gitignore file but then ceased doing so a few months ago.
I've tried a number of versions of SourceTree and they all fail to pick up the global .gitignore file despite it showing correctly, and opening correctly, in the Tools -> Options -> Git dialogue. I know there are no issues with the file as it works correctly when using git from the command line.
I'm currently using SourceTree 3.3.9 on Windows 10 version 1903.
The only way I have found to overcome it is to copy the global .gitignore into my current repository each time.
A vulnerability has been published today in regards to Sourcetree for Windows. The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event