Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Sourcetree does not ignore special files (eg. file[a].txt) properly in .gitignore

I'm a new user of Git and my project has many files like "file[a].txt" that I want to ignore.  Via the Sourcetree GUI I would ignore various files but then I would still see some seemingly-just-ignored files still as untracked in the GUI.

This really confused me, but luckily I tried another GUI (SmartGit) and managed to ignore these special files via their GUI.

Manually inspected the .gitignore file, I see that Sourcetree did not properly escape these special files properly, which is why they were showing up as untracked.  Sourcetree- vs SmartGit-created .gitignore look like this (in DIFF style):


Notice the incorrect escaping of the square brackets. I assume this is a bug in Sourcetree that needs fixing?

PS. I'm using Sourcetree on Win10 x64.

1 answer

1 accepted

0 votes
Answer accepted
minnsey Atlassian Team Sep 20, 2018


Yes it looks like a bug, thanks for reporting.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events