今日已更新 177 条资讯 | 累计 26160 条内容
关于我们

MOKSHA Devlog: Why My Game Worked on Itch.io but Died on GitHub Clone (The .gitignore Trap) 🤡

Weird Codes 2026年07月31日 02:59 1 次阅读 来源:Dev.to

Hey DEV Community! 👋 I am currently building MOKSHA, an HTML5 Canvas game deeply rooted in Vedic philosophy. The game involves managing your Karma, avoiding Maya (Illusions), and achieving spiritual liberation. Ironically, while building a game about waking up from cosmic illusions, I fell into a technical illusion myself yesterday. Let me tell you a chaotic detective story about how my game froze on a fresh repository clone, and how I found the silent assassin hiding in plain sight. 🤡 🚫 The Disaster: Works on Itch.io, Freezes on GitHub So, there I was, ready to release a fresh update. I generated my build packages locally, zipped them up, and proudly uploaded them to Itch.io. I hit Publish, tested the live link, and everything worked flawlessly. High scores, smooth frames, total spiritual awakening. Then, I casually walked over to my terminal, ran git add . followed by git push, and went to bed thinking I was an absolute pro. The next morning, I wanted to double-check my clean repository, so I cloned it fresh into a new folder. I booted up the local server, and... the entire game was completely unclickable. Dead clicks. Frozen canvas. Total illusion (Maya). 💀 Opening up the browser console revealed a fierce wall of red text: style.min.css:1 Failed to load resource: the server responded with a status of 404 (Not Found) main.min.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) 🕵️‍♂️ The Realization: It Wasn't Me, It Was My .gitignore! Initially, I blamed my sleep-deprived brain, thinking I forgot the chronological order of pushing and building. But when I opened my root directory to inspect the crime scene, I found the real culprit staring right back at me on lines 46 and 50 of my .gitignore file: dist/ *.zip index.min.html The Ultimate Trap Exposed 🪤 Because dist/ was explicitly blacklisted in my .gitignore, Git was literally doing its job perfectly by completely ignoring my production builds during staging! Here is exactly how the

本文内容来源于互联网,版权归原作者所有
查看原文