Moving this conversation from Twitter : I have noticed that when exporting a private project to a public @github repo with a file that’s to be ignored, after export, the same file is deleted on my private @glitch project. That seems like a recent change to me. Or is it a bug?
Here’s is link to the Twitter conversation https://twitter.com/mayeedwin1/status/1213098482308915200?s=19
I’ll ping @glitch_support seeing that this could be a bug! Also, I’m categorizing this to the ‘Feedback’ category.
Thanks @khalby786 that will be great. Having issues here! I’ll appreciate!
Thanks for reporting this! I am sorry that your ignored file got deleted when exporting your private project!
Our team is looking into it. I will post an update here once it is fixed.
hey @mayeedwin - I tried the steps that you described, but I can’t replicate the file being deleted. I do however see that the file is not shown in the lefthand side filetree, which is a known issue that we have in our editor right now where files that get ignored by .gitignore do not show up in the filetree. This is something we will work on fixing, but it may mean that your file has not actually been lost, it’s just not visible in the code editor.
If you delete the line in your .gitignore which applies the the missing file, and then reload your browser, does the file reappear?
Hey @sheridan, thank you for your feedback. So, the file doesn’t reappear, actually I still can recreate the same file with the same name. Doesn’t this mean it actually gets deleted?
This issue started like a few weeks ago.
There’s an additional bug in that our editor doesn’t stop you from creating a file with the same name as a file ignored by .gitignore, yes. And gah ok now I see that doing this also overwrites what you had in there before, so I see why your data got lost in this flow sorry about that.
I think we can fix this in the short-term by removing the ability to overwrite the existing file that was .gitignored, and then longer-term we’ll add a toggle in the .gitignore view to allow you to show and hide the .gitignored files so that this confusing situation is properly addressed. Thanks for the report and walking me through the issue!
ls in the Glitch Console show the hidden files if it is not shown in the Glitch editor file tree?
Yes that’s another way of seeing the files. You should see them there even after exporting a private repo (I do).
None of my research so far on this bug suggests that the underlying issue was related to the export, or that any files would have got deleted during an export to GitHub - I can see that ignored files do get overwritten if you attempt to recreate them though, as detailed above. However if you have an example of a project where you think this has happened to you (private or otherwise), and these explanations don’t seem to be covering what you’re seeing, please feel free to DM me a join link (Share > Invite Others to Edit) and I can do some more digging.
Hey @sheridan looking forward to the fix. I am a frequent & constant user of Glitch with GitHub and Firebase . Fixing this would be great. Happy to have walked you through the issue.
Kindly let me know when everything is ok!
This is great to note!
The short-term fix to prevent files in .gitignore from being overwritten is now out! Thanks again for the report. We’ll get the toggle that I mentioned prioritised in the roadmap - this will take a bit longer but I’ll report back in this thread once it’s available.
@sheridan, I think I found how to fix it. Just type
!<THE FILE YOU DONT WANT TO BE IGNORED AND SHOW IN THE FILE TREE> and when you refresh it, the previously gitignored file shows up.
In case it’s not clear, for example
!client.js and it will not get gitignored and will show up in the file tree (after
Glad to hear. Happy to hear that I helped track the error. I still love Glitch!
Let me kn when the long term fix is up!
Yeap! That works well!
I know this is old, but I’d propose adding this to the FAQ: https://glitch.com/help/hidden-files/
I will also add that I don’t think this works for other kinds of ignored files (like files that start with a