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 ↓Production + hotfixes only
All active work
Planned work goes into main. Production fixes come back into develop.
FOUNDATION
Start from what is live.
Create develop from the current production line. From this point forward, daily work lives on develop.
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 mainMoves your working folder onto the production branch.
git pull --ff-only origin mainDownloads the latest remote main. It stops instead of creating an unexpected merge commit.
git switch -c developCreates the new develop branch from main and switches to it.
git push -u origin developPublishes develop to GitHub and remembers where future git push commands should go.
The Copy button includes only the commands above.
DEFAULT MODE
Live on develop.
Features, refactors, experiments, and ordinary fixes all stay here. Keep commits small enough that future-you can understand them.
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 developMoves you onto the branch where active development belongs.
git pull --ff-only origin developUpdates your local branch from GitHub without creating a surprise merge.
git add -AStages 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 pushSends the new commit to the linked origin/develop branch.
Explanations never enter the clipboard.
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.
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
LINE BY LINEWhat each command does
git switch developReturns to the active-work branch before preparing the release.
git pull --ff-only origin developMakes sure your local release source matches GitHub.
git pushPublishes any final local commits before the release merge.
git switch mainMoves onto the production release branch.
git pull --ff-only origin mainUpdates 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 mainPublishes the release commit to GitHub. Build and submit the app from this branch.
The Copy button includes only valid shell commands.
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.
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 developConfirms you are saving the active branch—not changing production yet.
git add -AStages 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 pushBacks up that checkpoint on GitHub.
git switch mainReplaces the tracked working files with the clean production version.
git pull --ff-only origin mainUpdates production locally and stops if an unexpected merge would be required.
Paste this block first, then stop.
git add -A
git commit -m "Fix production crash"
git push origin main
LINE BY LINEPublish the finished hotfix
git add -AStages 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 mainPublishes the repaired production branch to GitHub.
This second Copy button includes only the publish commands.
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.
git switch develop
git pull --ff-only origin develop
git merge main
git push origin develop
LINE BY LINEWhat each command does
git switch developReturns to the branch containing your ongoing work.
git pull --ff-only origin developUpdates it from GitHub before combining histories.
git merge mainBrings the production crash fix—and every other legitimate main change—into active development.
git push origin developPublishes the synchronized active branch to GitHub.
The explanation is separate from the copied commands.
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.
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 mainMoves 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.1Publishes 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