Accidentally run the ggt in the wrong repo and now its deleted the files
Not quite sure the best way to get back to what I had before I did this - any recommendations?
23 Replies
It deleted virtually all my files...
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
So its deleted the gadget apps files - not the repo that I ran it in
Perhaps theres a way to restore it from an older backup - but at the moment I can't open in gadget as the files aren't there and thus have errors:
-
"api/" is not found. It must be a root level folder
-
"settings.gadget.ts" is not found
-
"accessControl/permissions.gadget.ts" is not found
-
"session" model must exist
Hello,
You will need to pull the last files from your git repository
As in the gadget files that were added to my repo that I mistakenly ran ggt in? - unfortunately I dismissed the commit to that repo... Is that the only way? Would it be possible to backup from a previous verison?
We retrieve files for our users as a last resort. You should start from your last commit that has the needed files in it
How would you do that if you don't mind me asking?
I went to sync.json and changed the files version but I am guessing that's not the right way to go about it
I think we might have to retrieve on your side if possible, I can't seem to get it back... I didn't link with a github repo - I just had it locally...
If you have a git repository please first bring back a previous commit
I don’t I am afraid…
I have the folder in my local environment and was using ggt. However I also had my shopify store GitHub repo open in another cursor window and mistakenly ran the ggt command there which is where the files got deleted. I discarded the changes in the commit on that repo…
Could you please share the URL of your app and I can get the files to you ASAP
https://wholesalers.gadget.app
Thanks man - appreciate it!
I did some things to get it to work again but it didn't work. Will just be the commit before all the files got deleted 😭
Your files have been sent to you privately
What would be the best way to restore to this version?
You should unpack the files locally and push them to the environment
I see, I think the zip you gave me didn't include the files that I lost - at least the important ones. The routes and utils from memory...
I only chose a version from 2 versions prior. Let me give you one from earlier
Ahh strange - there should be a few files in the routes : POST-wholesaler-submission.js, GET-wholesalers-[customerId].ts for example
Do you have anything in your .gadget folder backup?
Not the files I gave you but the files that were already in your local
Unfortunately not... also I can't access the gadget app ui as a lot of the main files were deleted so we get an error saying we need to fix the issue we introduced locally.
I do have some of the files in the trash by the looks of it.
Sorry to come back to this so late!
I sort of left it because it was to much to deal with at the time 😅
Is it possible to get the files in the version that had the routes in them and web files also - the files you gave me before didn't actually hold any of the files - seemed like a blank project.
All the files were saved to gadget before I messed everything up so they must be there somewhere 🤞
It's a very long process to go and find the correct files. I don't really have the bandwidth to do so. This is not something that we typically do for our customers
I understand - apologies!
I think I'll have to start again with it by the looks of it - my own fault
I would highly recommend immediately using git so that you can revert branches or commits if you make mistakes
Yes haha I learnt the hard way! Will be doing so with all my projects now