Can I choose to exclude specific sub-folders and files from syncing? (cubbyignore)

You can create a list of specific sub-folders and files to be excluded from syncing.

Here's what you do:
  1. On your PC or Mac (not in your browser), open a folder that is a cubby.
  2. Using Notepad or a similar text editor, create a file in the cubby and name it exactly as follows, including the leading dot:
  3. Delete the file extension so you are left with this, including the leading dot, but without the .txt extension:

    Remember that your system must be set to show file extensions! (Here's how: Windows / Mac) 

    Important: If you see the error You must type a file name, make sure you are using 
    a tool that allows you to see file extensions. Be sure to delete the .txt from the file name (for example, using Total Commander or Notepad with 'Save as type: All Files')

  4. Open the file .cubbyignore (with the file extension deleted) and enter a relative path to the file or folder you want to exclude. 
    Here's a sample relative path for a cubby called sample_cubby to prevent sample_folder from syncing: 
  5. Continue to add paths to files or folders. One item per line.

Notes for advanced users:

The format of .cubbyignore
 generally conforms to gitignore. The following is from gitignore documentation:
  • When deciding whether to ignore a path, git normally checks gitignore patterns from multiple sources, with the following order of precedence, from highest to lowest (within one level of precedence, the last matching pattern decides the outcome): Patterns read from a .gitignore file in the same directory as the path, or in any parent directory, with patterns in the higher level files (up to the toplevel of the work tree) being overridden by those in lower level files down to the directory containing the file. These patterns match relative to the location of the .gitignore file.
  • A blank line matches no files, so it can serve as a separator for readability.
  • A line starting with # serves as a comment. Put a backslash ("\") in front of the first hash for patterns that begin with a hash.
  • An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. If a negated pattern matches, this will override lower precedence patterns sources. Put a backslash ("\") in front of the first "!" for patterns that begin with a literal "!", for example, "\!important!.txt".
  • If the pattern does not contain a slash /, git treats it as a shell glob pattern and checks for a match against the pathname relative to the location of the .gitignore file (relative to the toplevel of the work tree if not from a .gitignore file). 
  • Not valid for .cubbyignore: If the pattern ends with a slash, it is removed for the purpose of the following description, but it would only find a match with a directory. In other words, foo/ will match a directory foo and paths underneath it, but will not match a regular file or a symbolic link foo.
  • Otherwise, git treats the pattern as a shell glob suitable for consumption by fnmatch(3) with the FNM_PATHNAME flag: wildcards in the pattern will not match a / in the pathname. For example, "Documentation/*.html" matches "Documentation/git.html" but not "Documentation/ppc/ppc.html" or "tools/perf/Documentation/perf.html".
  • A leading slash matches the beginning of the pathname. For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
  • The characters * and ? act as a wildcard

Feedback and Knowledge Base