Automatic backup when "failed to copy: is a directory not a file"

No no. This is how it happens:

  1. git correctly created a file at a subdirectory
  2. rclone correctly copied the file to the remote when syncing the parent directory.
  3. git correctly replaced the file with a directory in the same subdirectory
  4. rclone couldn't sync the parent directory anymore because there was a file already at the location

The only solution I could find is to delete the files from google drive manually. However, this has the drawbacks I listed above.

That's why I'm asking if there's an option in rclone to automatically handle this, be it by replacing the file or at least ignoring the problem.