.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

This widget could not be displayed.

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

This widget could not be displayed.

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 Sign up to answer
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...

860 views 2 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