SourceTree does not honour Global Ignore List

I have a ~/.gitignore_global file that contains ".DS_Store", with a correct path in ~/.gitconfig (i.e."[core] excludesfile = /Users/myusername/.gitignore_global") in order to find it. This works just as expected in the terminal, i.e. any .DS_Store are successfully ignored.

But in SourceTree, all .DS_Store files causes "Uncommitted changes". Note that in Preferences -> Git, the path to "Global Ignore List" is correct (i.e. "/Users/myusername/.gitignore_global"), so apparently "excludesfile" has been properly consulted in .gitconfig. But still, the Global Ignore List doesn't seem to be honored. What am I doing wrong?

2 answers

Is there any chance that you accidentally "added" the file before putting it on the ignore? If you go to the command line and do a "git status", what does it report?

When entering "git status" in Terminal I get the response: "On branch Foo Your branch is up-to-date with 'Bar'. nothing to commit, working directory clean" But when starting up SourceTree the .DS_Store files still causes "Uncommitted changes". I finally managed to get rid of it by executing various manual operations on the .DS_Store files, such as 'ignore', 'delete' and some others that I don't remember. It seems to work now, but it was a long and strange way of getting there.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

421 views 0 1
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