.gitignore Exceptions

I'm using SourceTree to version control a WordPress site. I'm excluding the wp-content/uploads folder, as this contains images mostly, however I want to make an exception for a folder that needs to be version controlled and can't be moved out of the uploads folder.

I've tried using the "standard" Git exception character of ! before the folder path (http://git-scm.com/docs/gitignore) but it's not working. I found a forum that stated that Git v1.5.4.1 doesn't support it (https://gist.github.com/jdbartlett/444295#comment-24598) but I can't tell which version it is.

Any help would be appreciated. Thanks,

Joel

2 answers

Click the "terminal" button in SourceTree and run git --version

Thanks Seth. I'm running git version 1.8.5.2 (Apple Git-48) so I assume the exception (!) should be working. Hmm...

Suggest an answer

Log in or Join to answer
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 ...

274 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot