March 5, 20266 min read

How to Use Git from Your iPhone

You're away from your desk and something git-related needs to happen right now. CI is red and a teammate is waiting on a fix. Someone pushed a commit and you need to see what changed. You're about to lose connectivity and want to stash your work before you do.

These situations don't wait until you're back at your laptop. Here's how to handle git from your iPhone and what the practical options look like.

What Are Your Options?

There are a few ways to run git on your iPhone.

One is to SSH into a remote server that has your repos on it. If you maintain a VPS or cloud dev machine, apps like Termius or Blink Shell handle the SSH connection and give you a real terminal. This works fine if you already have that server set up. If you don't, it's a lot of infrastructure to stand up just for this.

Another is Working Copy, an iOS app with a native git interface. It handles commits, branches, diffs, and pushes through a GUI. It's genuinely useful for reviewing changes or handling simple workflows, but it's not a terminal and it can't run arbitrary commands.

The simplest path for most developers is connecting back to your own Mac. Your Mac has git. It has all your repos. It has your SSH keys configured for GitHub and GitLab. It has your aliases and your gitconfig. You don't have to set anything new up. Just connect and run commands.

That's what Macky does. It gives you a terminal session on your Mac, accessible from your iPhone over an encrypted WebRTC connection. Everything below assumes that setup, but the git commands themselves are the same no matter how you get terminal access.

The Commands You'll Actually Use

When you're on your phone, you're not going to do complex interactive rebases or resolve gnarly merge conflicts across dozens of files. You want to check things quickly, pull things, push things, and get out. Here are the commands that matter.

Check where things stand

git status

Always start here. Current branch, what's staged, what's modified, what's untracked.

git log --oneline -10

The last 10 commits in a compact format. Good for confirming what's been pushed or spotting something unexpected.

Pull the latest

git pull origin main

Pull from the remote. Replace main with your branch name if needed.

See what changed

git diff HEAD~1

Diff against the previous commit. Good for quickly reviewing what someone just pushed.

git show <commit-hash>

Full diff and message for a specific commit. Get the hash from git log.

Switch branches

git checkout feature/some-branch

Switch to an existing branch. Add -b to create it at the same time.

Stash your work

git stash
git stash pop

Save and restore uncommitted changes. Useful when you need to switch branches without committing.

Push your changes

git push origin HEAD

Push the current branch. Using HEAD means you don't have to type the branch name.

Scenario: CI Is Failing and You're on the Bus

You get a Slack notification. The build is red. A teammate is blocked. You're 40 minutes from home.

Open Macky, connect to your Mac, navigate to the repo. Check what just happened.

cd ~/projects/my-app && git log --oneline -5

Spot the suspect commit and look at the diff.

git show abc1234

If it's a simple fix, edit the file with nano or vim, commit, and push.

nano src/config.js
git add src/config.js && git commit -m "fix: correct env variable name" && git push

If the fix is more involved, you can at least diagnose the problem and revert the commit to unblock the team.

git revert abc1234 --no-edit && git push

Scenario: Quick Code Review at a Coffee Shop

A teammate asks if you can look at their branch before they open a PR. You're out but you have ten minutes.

git fetch origin && git checkout origin/feature/their-branch
git diff main...HEAD

That shows all the changes their branch introduces relative to main. You can scroll through the diff on your phone and give them a quick thumbs up or flag something specific.

Set Up Git Aliases on Your Mac

Typing long git commands on a phone keyboard is slow. Aliases help a lot. Since Macky connects you to your Mac's shell, any aliases you have in your Mac's ~/.gitconfig are available automatically.

Here are some useful ones to add:

[alias] st = status lg = log --oneline -10 co = checkout di = diff p = push origin HEAD ri = rebase -i

Set these up once on your Mac. They're available every time you connect via Macky. git st and git lg are a lot more comfortable to type than the full versions.

A Note on Committing from Your Phone

Committing from your phone works fine, but keep the message short and accurate. A long, well-crafted commit message on a virtual keyboard is not a great experience. If you need to write something detailed, do it now and amend later when you're back at your desk.

git commit --amend

That opens your editor so you can rewrite the message. Just don't amend commits you've already pushed to a shared branch.

The Bottom Line

Git from your iPhone is mostly about handling urgent situations. The commands are exactly the same as on your Mac. The only question is how you get terminal access. If you connect to your Mac via Macky, everything is already there. Your repos, your SSH keys for GitHub and GitLab, your aliases, your gitconfig. You just open a session and run commands.

Try Macky

Connect to your Mac terminal from your iPhone. Free to start, no configuration required.