Ignore list doesn't apply

Want to exclude Git directories, but

.git/
.git/*
*.git
*.git/*

all of these do not work.

So my question is, how do exclude directories and how to exclude hidden directories?

@normenmueller: The ignore list only applies for new files/folders. So if the .git directory already exists then it will still be synced even if you add .git to the ignore list.

Also the ignore list is only compared to the name of the file/folder, it doesn’t perform path comparison. So in your case .git should be enough.

That’s not true:

mkdir test
cd test
git init

Then .git gets synced even .git/ is in my ignore list.

Please consider a re-work of ignore list (regex!) and selective sync (cf. Selective sync doesn't apply and Treat symlinks "as is", do not copy the files they point to)

1 Like

@normenmueller: Is your entry in the ignore list .git or .git/? The latter won’t work because the folder name doesn’t have a slash at the end. We’re considering improving the ignore list implementation but no plans yet.

Both are in my ignore list. Anyway, please consider in the course of improving the ignore list to also make it resizable or at least include horizontal scroll bars. Otherwise, having longer patterns, those are overlapped with dropdown buttons and their labels.

I added:
node_modules/*
node_modules/
node_modules/

To my ignore and it somehow still gets synced. I moved the folder that has these folders in it to somewhere outside my Google Drive Sync folder, waited for Insync to fully sync, then moved them back and it still somehow synced them. Any help?

I am trying to figure out a reasonable definition of “new” that I can apply to my situation.
Let say I have a folder abc that I sync and it contains some folders xyz that I should have had on the ignore list.
If I take the sync off of abc and delete abc from the gdrive. I add xyz to the ignore list, and turn the sync for abc back on.
Would the occurrences xyz found in abc be considered new because they had not been added to gdrive yet?

@James_Grimaldi1: A “new” item is one that is added to Insync after the ignore list rule is added. This applies to both the local computer’s side and Google Drive’s side. A new local item is one that is added to the Insync folder after the ignore list rule is added. On Google Drive’s side, if the item already exists in Drive but is not being synced yet, then the new ignore list rule will still be applied to it.

In your case it looks like you are adding the folder abc on the local computer’s side. If you remove the abc folder from your Insync folder, add “xyz” to the ignore list, then put the abc folder back, then the xyz folder will be ignored but the other contents of the abc folder will be synced.

A note regarding selective sync. If you unselect an item in the selective sync interface, then it will be removed locally but kept in Drive. So in your example, when you take the sync off of abc, then the folder will be deleted in your local computer. If you then also delete it from Google Drive then its entry will be removed from the selective sync interface.

I am currently evaluating insync, I think you should clarify the ignore list limitations.
I have met numerous bugs or “undocumented features” such as:

  • renamed folders not ignored --> especially frustrating when manually creating a folder/file with the default name “New folder”: it is synched by insync, then whatever the name we give, insync continue to sync the folder/file

  • unexpected behaviour when you put “/” in a pattern (after investigation, what is branded as a “full glob syntax support” is barely a file name matching, hence you can’t exclude thinks like “*/build/classes”)

  • inconsistent behaviour before/after a restart (observed on Mac, some ignored files where synced after a restart)

As a developper myself I don’t really understand what’s so challenging in the implementation of the ignore list.
Please implement a simple, bug-free .gitignore, and I am on board.

6 Likes