Prevent SourceTree from settings core.excludesfile

I seem to be in a bit of an endless loop with configuring my git excludes file in SourceTree.

My global git config is kept in `~/.config/git/config`. My global git ignore is stored next to the config file at `~/.config/git/ignore`. This is the default value for core.excludesfile and as such is detected even when that settings is not defined in my config file.

The problem lies in the fact that SourceTree somewhat randomly will decide that my excludes file needs to be set. It then sets it to `~/.gitignore_global`.

 

Just trying to understand if theres anything in particular i'm doing that is causing this to reoccur.

 

1 answer

First of all:

check your sourceTree global git config in preferences

Bildschirmfoto 2016-02-01 um 07.37.27.png

it's typically set to ~/.gitignore_global. You might fix this manually and reset this to what is configured in core.excludesfile.

If you ask me: it's a bug that this is configured by default. While you can see, the new .config/git global ignore file was introduced in 1.9.x release (refer to git-scm.com/docs/gitignore) it seems to be common practice from the past to change this, like github documents it.

Unfortunatly another default setting will always reset this:

Bildschirmfoto 2016-02-01 um 07.45.42.png

check this and turn it off, I have much less problems without it too.

Feel free to check back the issue tracker and file a bug request for this.

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

274 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot