Unable to get Source Tree to ignore some folder hierarchies

Don Clark May 11, 2016

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

1 vote
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2016

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.

Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2016

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.

Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2016

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events