Skip to main content

Delete Google Drive Icon Files & General Recursive Delete

By February 24, 2016Blog, Git, Sysadmin
Allure Web Solutions Code Snippet

Apparently Google Drive and git repos are not friends. Those pesky little Icon files that Google Drive adds creates some impossibilities when it comes to maintaining a git repo. Once you realize your mistake, you’ll need to move your repo out of your Google Drive and clean up your Icon files. This is how you do it:

find . -name 'Icon*' -type f -delete

This command can also be used to delete any files recursively, that match a certain pattern.

If you really want to keep your repo in Google Drive…

Add *Icon* to your .gitignore file. Just make sure you don’t have any other files you want to track with “Icon” anywhere in the name, beginning, middle, or end.

allure

Author allure

More posts by allure

Leave a Reply

Designed by

best down free | web phu nu so | toc dep 2017