Unable to get Source Tree to ignore some folder hierarchies

My .gitignore file, in a project file, contains /Carthage/Checkouts/, but Source Tree won't ignore the folder hierarchy that exists in that project folder at Carthage/Checkouts.  I've also tried:

Carthage/Checkouts/

/Carthage/Checkouts/*

/Carthage/Checkouts/**

None of these cause Source Tree to ignore that folder hierarchy.  What is the magic syntax that I'm missing?

1 answer

Are there files in that folder that have already been committed to Git? If so, you need to "remove" them from Git before they can be ignored.

Yeah, that's my first thought as well

Use 

git rm --cached <filename>

to remove a file from the repo without deleting it from your working directory.

Once you've done that, any one of your examples should work

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

737 views 3 2
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