clasp icon indicating copy to clipboard operation
clasp copied to clipboard

File deletion on server not reflected in local after clasp pull

Open tanyagupta opened this issue 5 years ago • 5 comments

(Please search existing issues before creating a new one.)

Expected Behavior

clasp pull should pull latest changes made remotely both additions and deletions (including added or deleted files)

Actual Behavior

Using clasp pull I am finding files deleted in the server are not being deleted locally.

Steps to Reproduce the Problem

  1. clasp clone <scriptId>
  2. Then delete a file on the server
  3. clasp pull
  4. local copy still shows deleted file

Specifications

  • Node version (node -v): 8.9.4
  • Version (clasp -v): 1.5.2
  • OS (Mac/Linux/Windows): Mac

tanyagupta avatar Aug 15 '18 11:08 tanyagupta

Yes, this is a known issue. The API doesn't make it easy to safely delete files.

I guess I could delete all non-ignored, non-pulled files when you pull. This would still not delete ignored files though.

grant avatar Aug 15 '18 15:08 grant

Thanks @grant good to know.

tanyagupta avatar Aug 16 '18 12:08 tanyagupta

In reality, we'd need a better file system with API like git to detect server deletions.

grant avatar Jan 25 '19 21:01 grant

Any update on this please?

Anuvad avatar Nov 08 '21 14:11 Anuvad

+1 to many times i have duplicated a file because of this

coreyjansen avatar Mar 14 '22 22:03 coreyjansen