From the discussion on #1013:
Since the rule in VS is packages/*, the fact that it contains a slash means
that it is anchored to the top level. That is, is will only apply to
a directory called packages at the top level, and not to any at deeper
directories like App_Data. So these rules at the bottom of your changes
actually aren't necessary after all. I just confirmed this with a quick test.
# Ignore Umbraco content cache file
**/App_Data/umbraco.config
-
-# Don't ignore Umbraco packages (VisualStudio.gitignore mistakes this for a NuGet packages folder)
-# Make sure to include details from VisualStudio.gitignore BEFORE this
-!**/App_Data/[Pp]ackages/
-!**/[Uu]mbraco/developer/[Pp]ackages
\ No newline at end of file