question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File deletion on server not reflected in local after clasp pull

See original GitHub issue

(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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
grantcommented, Aug 15, 2018

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.

1reaction
coreyjansencommented, Mar 14, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Audit File Deletion on Your Windows File Servers
Navigate to the file share, right-click it and select "Properties" → Select the "Security" tab → Click the "Advanced" button → Go to...
Read more >
Git not delete deleted file in local repo - Stack Overflow
For example:I delete file in remote repo. Local repo still have this delete files. Then i use git pull to fetch changes to...
Read more >
Problems when using CLASP to push client-side files from a ...
Edit your .clasp.json and set the "fileExtension" property to "gs". That will prevent clasp from renaming your "gs" to "js".
Read more >
Solved: How to delete a file at remote branch after I dele...
Solved: Hi, I am a newbie to Git system. Before I found out using `git rm` to delete files, I directly delete files...
Read more >
Command Line Interface using clasp | Apps Script
Since the code is local, you can use your favorite development tools like git when building Apps Script projects.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found