Does Glitch ignore the files and directories listed on “.gitignore” when exporting to GitHub?
It should - that’s the reason for having .gitignore. Are you seeing different behavior?
Sorry for digging this up but i have a similar question. Does Glitch ignore the files and directories listed on “.gitignore” when import from GitHub?
Yes - they don’t show up in the editor
Hey @trithien97, when you import fromGitHub the contents of your project are overwritten by the imported files. Typically there won’t be any files in the GitHub repo if they’re listed in .gitignore
, so there won’t be anything to import.
Once imported, and files added that are listed in .gitignore
won’t show in the Editor file tree, as @jarvis394 notes.
Hi @cori, is there another way to save data files in a folder on Glitch beside using the .data folder? I tried storing some images in a folder called “images” and then add the line “images/**” to .gitignore file to ignore that folder. However it always get overwritten when i import my code from GitHub.
Hey, @trithien97
You can try using this script instead of using Import from GitHub
button:
#/bin/sh
git fetch origin master
git reset --hard origin/master
git pull origin master --force -X theirs
yeah, @trithien97, this is how i personally do imports if i don’t want to overwrite my app! when you use ‘import from github’ button, the repo on github completely overwrites the project on glitch which is why you’re losing those images.