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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

427 views 0 1
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