It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SourceTree Ignores my .gitignore file

I have a repository with a .gitignore file at the root of the repository. On the command line, git uses this file and correctly ignores the files I want ignored. SourceTree does not appear to pick up this file. When I go to commit in SourceTree, files that should be ignored are not ignored.

How can I get SourceTree to reconize the .gitignore file

11 answers

SourceTree uses its own gitignore file. SourceeTree -> Tools -> Options -> Git shows the git ignore file location it uses. You can edit the file from a button in that dialog.

See also: https://stackoverflow.com/questions/30907829/sourcetree-adding-files-in-global-gitignore-not-in-repository-gitignore

Ed Conde I'm New Here 8 hours ago

This worked for me, thanks!

Same here

Maybe this is why:

".gitignore will prevent untracked files from being added (without an add -f) to the set of files tracked by git, however git will continue to track any files that are already being tracked."

 From http://stackoverflow.com/questions/1274057/making-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore

git bash status is correct.

sourcetree status is wrong.

Same problem in 2019 that was there in 2013. Are you kidding me???? COME ON!!!!

Same here, cannot ignore.

No doubt SourceTree is an "attempt" to make GIT easier, whether it is successful depends on what day you ask me.

Same issue here. Please fix.

I have the same issue. I have the .gitignore set in advanced settings at the "repository-specific ignore list" option, I have added the *.pyc to .gitignore, yet my pyc files are still listed in the working copy changes.

Thanks!

I have the same problem when opening an existing git repository.
The gitignore file itself is ignored by Sourcetree (Version 1.6.11.0)

Also having the same problem where SourceTree is not recognizing my .gitignore file.

Please Update,

Thank You

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Agile

Webinar: Dean Leffingwell and Steve Elliot present on SAFe 5.0, come ask Dean and Steve questions!

...steemed Steve Elliot (head of product for Jira Align). Agenda: What’s new or changed in SAFe 5.0: Introduction of OKRs Essential SAFe How to achieve true business a...

126 views 0 1
Read article

Community Events

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

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you