How to commit code from your phone
A phone-first workflow to review diffs, stage intentionally, and commit safely — without needing to remote-desktop into your machine.
- CLI
- 0.1.0
- Preview ref
- f36aa45
I keep ending up one clean commit away from “done” at the exact moment I’m not in front of my laptop.
It’s usually a small thing: an agent session wrapped up, I spot a couple drive-by fixes, and I want to lock in a clean baseline before I forget why I touched those files.
From my phone, I’m not trying to do fancy Git surgery. I just want a tight loop:
Review the diff → stage intentionally → write a good message → commit → (maybe) push.
What I wanted was a way to do that loop from my phone without remote desktop, and without turning my phone into a tiny terminal.
TL;DR (the workflow)
If you want the quick version, it’s:
- Decide which approach fits your constraints:
- full terminal control (SSH/tmux),
- PR-only review (GitHub), or
- a phone-friendly UI that operates on the repo where it lives.
- If you’re using Happier: set it up on the machine that has your repo (and connect your phone). Start with: How to run Happier from your phone
- Open the session on your phone and check Source control.
- Read the diff in Review (before you stage anything).
- Stage only what belongs together.
- Write a commit message (optionally generate a draft, then edit it).
- Commit.
- Push only if the repo state is clean (no conflicts / not behind / not detached).
What “commit from your phone” actually means (in practice)
A commit has to happen where the repository working tree lives (your laptop, server, or dev box). So the question isn’t “can my phone run git?” — it’s:
- can you review and control the repo from your phone,
- while the actual git operations run on the machine that owns the workspace.
That’s the workflow Happier is designed around: you do the “review / stage / commit” loop from your phone, and the repo + Git stay on the machine that owns the workspace.
When this approach is a good fit (and when it isn’t)
This workflow fits when:
You have a repo that lives on a machine you control (laptop, server, dev box), and you want a conservative surface for diff review + staging + committing. You’re also okay with the fact that Git write actions are behind a feature toggle (and may be marked experimental).
It’s not a fit when:
You need history surgery (rebase, reset, cherry-pick), you’re mid-conflict, or the machine that owns the repo simply isn’t reachable. In those cases, I switch back to a real terminal.
What I tried first (and why it wasn’t quite it)
I kept cycling through the usual options:
- SSH + tmux: it works, but on a phone I end up rushing diff review and staging.
- Remote desktop: fine for one-off emergencies, but it’s heavy and misclick-prone on mobile.
- GitHub mobile: great when the work is already in a PR, but it doesn’t help with the uncommitted state sitting on my machine.
What I actually wanted was closer to “GitHub Desktop, but on my phone” — while still operating on the repo where it lives (not a second copy in the cloud).
- Happier: this is the closest thing I’ve found to that “GitHub Desktop, but on my phone” feeling — I can review diffs, stage intentionally, and commit from mobile while the repo and Git stay on my machine. Trade-off: still depends on the machine/daemon being reachable.
If you’re new to Happier (what it is, and where to get it)
If you haven’t seen Happier before: it’s an open-source companion app (mobile/web/desktop) for AI coding agents like Claude Code, Codex, and OpenCode.
The workflow I’m describing here is: use Happier to review diffs, stage, and commit from your phone, while the session (and the repo/Git) stays on the machine that owns the workspace (laptop / server / dev box).
For this guide, that means you can do the last-mile “review + stage + commit” step from mobile without remote desktop.
Get set up:
- How to run Happier from your phone
- GitHub: https://github.com/happier-dev/happier
- Install/download: https://github.com/happier-dev/happier#how-it-works
- Discord (community + support): https://discord.gg/W6Pb8KuHfg
Prerequisites
You’ll need:
- A Happier session connected to the machine that has your repo.
- Repository/file access available (these screens can only show real data when the machine-level workspace APIs are reachable).
Enable Git write operations (important)
By default, Happier’s repository browsing and diff review can be available, but Git write actions (stage/unstage/commit/pull/push/etc.) are gated behind a feature toggle:
- Go to Settings → Features → Git operations
- Enable it (treat it as experimental)
If you don’t enable Git operations, you can still use the same workflow to review changes, but you’ll finish the commit from the terminal.
Step-by-step: commit code from your phone
The exact UI layout changes between desktop and mobile. On phone-sized screens, I’ve found it works better when the app uses focused “one thing at a time” screens (instead of squeezing a desktop sidebar layout into a tiny viewport).
1) Open Source control
In your session UI:
- Open Source control (the repository status surface)
You should see:
- the current branch summary
- a changed-files list (with status like
A,M,D) - additions/removals summaries where available
If you don’t see repo status at all, jump to Troubleshooting.
2) Review diffs (before staging)
Do a quick pass before you stage anything:
- Open the Review surface to scroll through uncommitted diffs as one continuous review.
- Collapse files you’re done with.
- If you need to fix a file, open it in the editor, make the edit, then come back to Review.
On a phone, I find it much easier to stay oriented in a purpose-built diff/review UI than in a raw terminal.
3) Stage intentionally
From the changed-files list you can:
- stage/unstage whole files
- (where supported) stage selected lines/hunks
When I’m committing from a phone, staging discipline matters more than usual. My default rule:
- stage only the files that belong to one coherent change
- leave drive-by formatting, debug logs, and unrelated edits for a separate commit
4) Write a commit message (optionally generate a draft)
At the bottom of Source control, Happier provides a commit composer.
You can type your own message, or use Generate commit message to draft one.
Important notes:
- the generator proposes text; it does not auto-commit
- you can configure backend/instructions in Settings → Source Control
Even if you use the generator, treat it like autocomplete: skim the staged diff and adjust the message to match what you actually staged.
5) Commit
Commit the staged changes.
If Happier blocks the action, it’s usually because the repo is in a state that’s unsafe for automated UI operations (conflicts, detached HEAD, etc.). That’s intentional.
6) Push (optional) — understand the safety rails
If you choose to push from the phone, expect conservative safety rails. I like that bias — it’s more likely to refuse a risky push than to let you do history surgery from a small screen.
Examples of the kinds of rules you may run into:
- pull is fast-forward only
- push/pull/revert are blocked when
HEADis detached - push is blocked when local is behind upstream
- push/pull/revert are blocked while conflicts are present
If you hit a block, that’s usually the right moment to either:
- fix the repo state from a full terminal, or
- switch branches / clean up / resolve conflicts first.
A practical workflow for AI coding sessions (Claude/Codex/etc.)
If your “commit from phone” need comes from running an agent session, the phone-first loop that’s been the least painful for me is:
- Review what the agent changed in Review
- Make small edits from the built-in editor (fix naming, remove accidental files)
- Commit with a tight message
- Send a follow-up instruction to the agent (“continue from this clean baseline”)
One subtle but useful habit: use the composer Link file / file browsing tools to attach exact files into your next prompt, instead of describing paths manually.
Attachments vs project files (don’t commit the wrong thing)
Happier supports attachments as a session workflow. Attachments are great for:
- pasting logs
- sharing one-off files
- sending artifacts for the model to read
…but attachments are not the same thing as project files you intend to commit.
If your goal is “this should land in git”, put it in the workspace via Files (create/upload/edit) — not as a transient attachment.
Troubleshooting
I can’t see Source control / diffs on my phone
Common causes:
- The machine/daemon that owns the repo isn’t reachable.
- You’re not connected to the same server/relay as your machine.
If the session is inactive but the machine is online, Happier can still load repository/file data via machine-level workspace APIs — but only if it can actually reach that machine.
Staging/commit buttons are missing
Git write actions are behind a toggle:
- Settings → Features → Git operations
Happier won’t let me push/pull/commit
That’s usually a repo safety rule doing its job. Typical blockers:
- conflicts present
- detached
HEAD - branch is behind upstream
Resolve the repo state from a full terminal, then come back to the phone workflow.
I can review diffs but can’t commit
That can happen if read-only repo data is available but write operations are disabled (feature toggle off) or blocked by repo state.
In that case, the “best of both worlds” workflow is:
- do your diff review + cleanup on the phone
- then finish the actual commit/push from the terminal when you’re back at a laptop
FAQ
Can I do this from an iPhone or Android phone?
Yes — the main difference is ergonomics.
- On phones, Happier uses focused screens (lists → details) instead of a multi-pane desktop layout.
- On iOS/Android, you may prefer reviewing diffs and staging on mobile, then doing any conflict cleanup from a full terminal later.
Why can I review diffs, but I can’t stage/commit?
Two common reasons:
- Git write operations aren’t enabled. Enable Settings → Features → Git operations.
- The repo is in a state where write ops are intentionally blocked (conflicts, detached
HEAD, etc.).
Why is push blocked?
Happier is conservative by design. Push is typically blocked when:
HEADis detached- the local branch is behind upstream
- conflicts are present
In those cases, treat the phone workflow as: review + stage + commit. Then push after you’ve cleaned up repo state from a full terminal.
Do I have to push from my phone?
No. A totally reasonable “phone-first” workflow is:
- review diffs
- stage intentionally
- commit
…and then push later when you’re back at a laptop (or when you’re comfortable doing a quick terminal sanity check).
What if my machine/daemon isn’t reachable?
Then you won’t be able to load source-control state from the repo. At that point your options are:
- wait until the machine is reachable again, or
- fall back to SSH / remote desktop.
Happier doesn’t make network or machine availability issues disappear — it just makes it easier to keep the workflow moving from your phone when the machine is reachable.
Related guides
Next steps
- If your main pain is code review: a dedicated guide on “review diffs from your phone” is usually a better starting point (it’s a slightly different flow than committing).
- If you keep getting blocked at the same step (commit/push missing, repo not reachable, etc.), turn that into a tiny checklist for yourself — it’ll save you 10 minutes every time.