TExcelTAD
Home › Assets, Tools & Shipping › A Reliable Project Workflow

A Reliable Project Workflow

Before you worry about Steam capsules or texture compression, make sure you can do five boring things on every project: create it, run it, debug it, commit it, and restore an earlier version. Projects without that routine lose days to "it worked yesterday". This lesson sets up the routine; the rest of the course builds on it.

The routine

  1. Create a repository before you write the first line, and commit the clean starter project (the engine's empty template plus .gitignore and .gitattributes).
  2. Make one small, focused change at a time.
  3. Run the game after each meaningful change. If it broke, you know which change did it.
  4. Commit with a message that describes the change in game terms ("Jump buffer of 0.1 s", not "stuff").
  5. Keep source, project settings and build scripts in version control; keep generated folders out.
  6. Never commit credentials, signing keys, passwords or API tokens.
  7. Keep a short dev log: what changed, what failed, what you learned.

A real session on day one of a project looks like this (verified with Git 2.54):

bash · try it yourself
mkdir star-catcher && cd star-catcher && git init -q
mkdir -p src assets/sprites
printf 'node_modules/\ndist/\n*.log\n.env\n' > .gitignore
printf '*.png binary\n*.wav binary\n' > .gitattributes
printf 'console.log("Star Catcher");\n' > src/main.js
git add . && git commit -q -m "Clean starter project"
printf 'const SPEED = 240;\n' >> src/main.js
git commit -q -am "Basket moves at 240 px/s"
echo "frame 1 ok" > debug.log          # generated file: ignored, never committed
git log --oneline
git status --short --ignored
2babc89 Basket moves at 240 px/s
c1d698b Clean starter project
!! debug.log

Restoring an earlier version

The milestone for this lesson is "I can get back yesterday's working game". Three tools cover nearly every case:

bash · try it yourself
mkdir demo && cd demo && git init -q
echo 'speed = 240' > tuning.txt && git add . && git commit -q -m "Speed 240"
echo 'speed = 900' > tuning.txt && git commit -q -am "Try speed 900"
git tag playtest-1 HEAD~1
git show playtest-1:tuning.txt          # look at an old version without touching your files
git restore --source=playtest-1 tuning.txt
cat tuning.txt                          # one file back to the tagged version
git restore tuning.txt                  # (undo that again)
git switch -q --detach playtest-1       # or the whole project, to run the old build
git log --oneline -1
git switch -q main                      # back to the latest work
speed = 240
speed = 240
ebc44fb Speed 240

git revert undoes a commit that is already shared; see Git Revert and Git Recovery for the rest.

Secrets stay out

Signing keystores, store API keys and server passwords must never be committed, because Git history is forever and repositories get shared, forked and leaked. Put them in environment variables or your CI's secret store, and add the file names to .gitignore before the files exist. A quick pre-commit check catches the common cases:

python · try it yourself
import re

staged = {
    "src/main.js": "const SPEED = 240;\n",
    "build/upload.sh": "butler push dist me/star-catcher:html5\n",
    "android/release.keystore": "<binary>",
    "config/steam.cfg": "STEAM_PASSWORD=hunter2\n",
    "README.md": "Set BUTLER_API_KEY in your CI secrets.\n",
}
banned_names = re.compile(r"\.(keystore|jks|p12|pem|key)$|(^|/)\.env$|\.env
quot;) banned_text = re.compile(r"(PASSWORD|SECRET|API_KEY)\s*=\s*\S+") problems = 0 for path, text in staged.items(): if banned_names.search(path): print(f"BLOCK {path}: secret-looking file name") problems += 1 elif banned_text.search(text): print(f"BLOCK {path}: contains an assigned secret") problems += 1 print(f"{problems} problem(s); commit {'refused' if problems else 'allowed'}")
BLOCK android/release.keystore: secret-looking file name
BLOCK config/steam.cfg: contains an assigned secret
2 problem(s); commit refused

Note that README.md passes: it mentions BUTLER_API_KEY but doesn't assign a value. Real projects use a maintained scanner (for example gitleaks or GitHub's secret scanning) in a pre-commit hook and in CI; see Git Hooks.

The dev log

Keep a plain DEVLOG.md in the repository with one dated entry per session:

markdown
## 2026-03-14
- Changed: basket speed 240 px/s, stars spawn every 0.8 s
- Broke: stars spawned off-screen at 4K (spawn x used a fixed 800 px width)
- Learned: use the canvas width, never a constant
- Next: pause on blur

It takes two minutes. Six months later it is how you write the post-mortem, the devlog posts and the "what I built" part of your portfolio.

Test yourself

What should the very first commit of a project contain?

  1. The finished first level
  2. The clean starter project with .gitignore and .gitattributes
  3. Nothing, commit only when it works
  4. The build output

Which command shows an old version of a file without changing your working files?

  1. git restore
  2. git show <rev>:<path>
  3. git reset --hard
  4. git switch

Where should a signing keystore's password live?

  1. In the repository, encrypted with base64
  2. In the CI secret store or an environment variable, never in the repository
  3. In the README
  4. In the game build