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

7 answers

This widget could not be displayed.

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

This widget could not be displayed.

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!

This widget could not be displayed.

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

This widget could not be displayed.

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

Please Update,

Thank You

This widget could not be displayed.

Same here

This widget could not be displayed.

Same here

This widget could not be displayed.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Monday in Teamwork

The tools we make for teams? We use them every day at Atlassian to get shit done (and it works).

I’m Jess, a Product Marketer for Jira Software Server and Data Center, and now a huge fan of our products. Read on for a 90 day, new-hire perspective on what it’s like to standardize on the Atlassian...

35 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