GIT://WORKFLOW SOLO APP RELEASES

Ship fast.
Fix clean.

Two branches. One production truth. No unfinished feature work inside an emergency release.

Start the flow
01 / RELEASE LINE MAIN

Production + hotfixes only

02 / WORK LINE DEVELOP

All active work

SHIP DEVELOP → MAIN
SYNC FIX MAIN → DEVELOP
THE ONLY RULE TO REMEMBER

Planned work goes into main. Production fixes come back into develop.

02SETUP ONCE

FOUNDATION

Start from what is live.

Create develop from the current production line. From this point forward, daily work lives on develop.

SETUP_ONCE.SH
git switch main
git pull --ff-only origin main

git switch -c develop
git push -u origin develop
LINE BY LINEWhat each command does
git switch main

Moves your working folder onto the production branch.

git pull --ff-only origin main

Downloads the latest remote main. It stops instead of creating an unexpected merge commit.

git switch -c develop

Creates the new develop branch from main and switches to it.

git push -u origin develop

Publishes develop to GitHub and remembers where future git push commands should go.

The Copy button includes only the commands above.

03DAILY WORK

DEFAULT MODE

Live on develop.

Features, refactors, experiments, and ordinary fixes all stay here. Keep commits small enough that future-you can understand them.

YOU ARE HERE: DEVELOP
DAILY_WORK.SH
git switch develop
git pull --ff-only origin develop

git add -A
git commit -m "Describe your work"
git push
LINE BY LINEWhat each command does
git switch develop

Moves you onto the branch where active development belongs.

git pull --ff-only origin develop

Updates your local branch from GitHub without creating a surprise merge.

git add -A

Stages every tracked, new, and deleted file in the current repository.

git commit -m "Describe your work"

Saves the staged snapshot. Replace the quoted text with a clear description first.

git push

Sends the new commit to the linked origin/develop branch.

Explanations never enter the clipboard.

04PLANNED RELEASE

DEVELOP → MAIN

Ship only what is ready.

When every change currently on develop belongs in the next app version, merge it into main. Build and submit from main.

DEVELOPMAIN
PLANNED_RELEASE.SH
git switch develop
git pull --ff-only origin develop
git push

git switch main
git pull --ff-only origin main
git merge --no-ff develop -m "Release version 3.6.1"
git push origin main
BUILD + SUBMIT FROM MAIN
LINE BY LINEWhat each command does
git switch develop

Returns to the active-work branch before preparing the release.

git pull --ff-only origin develop

Makes sure your local release source matches GitHub.

git push

Publishes any final local commits before the release merge.

git switch main

Moves onto the production release branch.

git pull --ff-only origin main

Updates local main to the latest published production state.

git merge --no-ff develop -m "Release version 3.6.1"

Merges all ready work into main and creates a clearly named release merge. Change the version in the message.

git push origin main

Publishes the release commit to GitHub. Build and submit the app from this branch.

The Copy button includes only valid shell commands.

05EMERGENCY FIX

PRODUCTION CRASH

Leave unfinished work behind.

First commit your active work so the checkout is clean. Then switch to main, change only the production problem, and submit the fix from there.

01_SAVE_AND_SWITCH.SH
git switch develop
git add -A
git commit -m "WIP: active development"
git push

git switch main
git pull --ff-only origin main
LINE BY LINESave work and return to production
git switch develop

Confirms you are saving the active branch—not changing production yet.

git add -A

Stages all current active-work changes, including new and deleted files.

git commit -m "WIP: active development"

Creates a safe checkpoint so unfinished work cannot follow you to main.

git push

Backs up that checkpoint on GitHub.

git switch main

Replaces the tracked working files with the clean production version.

git pull --ff-only origin main

Updates production locally and stops if an unexpected merge would be required.

Paste this block first, then stop.

NOWFix the crash in your editor and bump the build number.Do not continue until the production change is ready.
02_PUBLISH_HOTFIX.SH
git add -A
git commit -m "Fix production crash"
git push origin main
BUILD + SUBMIT THE HOTFIX FROM MAIN
LINE BY LINEPublish the finished hotfix
git add -A

Stages the crash fix and required build/version changes. The branch was clean before you edited it.

git commit -m "Fix production crash"

Saves the exact production repair as its own commit.

git push origin main

Publishes the repaired production branch to GitHub.

This second Copy button includes only the publish commands.

06SYNC BACK

MAIN → DEVELOP

Keep the fix forever.

As soon as the production fix is committed, merge main into develop. Your active version now contains the same repair.

MAINDEVELOP
SYNC_THE_FIX.SH
git switch develop
git pull --ff-only origin develop
git merge main
git push origin develop
NEVER CHERRY-PICK THIS FIX
LINE BY LINEWhat each command does
git switch develop

Returns to the branch containing your ongoing work.

git pull --ff-only origin develop

Updates it from GitHub before combining histories.

git merge main

Brings the production crash fix—and every other legitimate main change—into active development.

git push origin develop

Publishes the synchronized active branch to GitHub.

The explanation is separate from the copied commands.

07TAG WHAT IS LIVE

PRODUCTION MEMORY

Name the exact release.

main can temporarily contain an update waiting for review. A tag permanently identifies the exact commit that reached users.

TAG_LIVE_VERSION.SH
git switch main
git tag -a v3.6.1 -m "Production v3.6.1"
git push origin v3.6.1
LINE BY LINEWhat each command does
git switch main

Moves to the production branch containing the live release commit.

git tag -a v3.6.1 -m "Production v3.6.1"

Attaches a permanent, annotated production label to the current commit. Replace both version values.

git push origin v3.6.1

Publishes that tag to GitHub. Replace the version here with the same value.

Edit the version first; Copy never includes this explanation.

COMMIT THIS TO MEMORY

DEVELOP → MAIN to ship.
MAIN → DEVELOP to keep the fix.

Run it again
Copied to clipboard