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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

647 views 0 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