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

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

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

Same here

Same here

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 Nov 01, 2018 in Summit

Summit 2019 is going to Las Vegas

You asked we answered - Summit 2019 registration is now open! Can you believe Atlassian Summit hasn’t been to the US since 2017? Now is the time to get ready for an event to remember! Our biggest u...

235 views 5 4
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