Git & GitHub
PocketCode has Git built in: nothing to install and no git command to type. Stage by hunk, commit, switch and merge branches, stash, blame, rebase interactively and cherry-pick, then read and manage your GitHub pull requests, issues and CI. It runs on the JGit library inside the app, so everything local works offline; only talking to a remote (clone, pull, push, GitHub) needs a connection.
What it is and how to open it
Git is not one screen: each piece lives where you already work. Pick the door that matches what you are doing.
| Where | How to open it |
|---|---|
| Source Control (editor) | Open the editor's command palette or menu, go to the Git section and choose Source Control. Or press Ctrl+Shift+G on a physical keyboard, or tap the branch name or the blame text in the status bar. |
| GitHub PRs & Issues (editor) | Command palette or editor menu → Git → GitHub PRs & Issues. It has no shortcut. |
| Local History… and Compare with… (editor) | Command palette. Neither has a shortcut. |
| Git Panel (terminal) | In the terminal, open the tools panel or the terminal menu and choose Git Panel. |
| The project card (Projects) | Tap a card's chevron to expand it: Commit, Git, Publish, and Pull / Push / Fetch when the project has a remote. Clone is the tile at the top of the page. |
| Your GitHub account | Settings → Integrations → Connected Services → GitHub. |
What is under the hood
- Built-in engine. Git runs on JGit 6.5.0, a Git library for Java, inside the app. The local terminal has no
gitprogram, so its Git Panel uses the same engine; over SSH the panel runs the host's owngit. - Works offline. Status, staging, commits, diffs, blame, history, stash, merge, comparing branches, rebase, cherry-pick, branches, tags and Local History need no connection. Clone, fetch, pull, push, publish and everything on GitHub do.
- A new project is not a repository yet. Start tracking it with Start tracking this project (Projects → Git) or Initialize repository (the terminal's Git Panel). Cloning gives you a repository. PocketCode's own
.pocketcode/folder is left out of your changes. - Other doors. The AI chat can run Git for you (status, commit, log, diff, branch, push and pull; push asks for your confirmation) and Workflows has a Git step (status, commit, push, pull, checkout, log, diff). Both use this same engine and are covered on their own pages.
Ctrl+Shift+G is the only Git shortcut. GitHub, Local History, Compare with… and rebase have none.Screen map
Every screen and sheet that touches Git, and where it lives. The next sections go through them one by one.
| Screen | How you get there | What you can do |
|---|---|---|
| Source Control | Editor → Git → Source Control, Ctrl+Shift+G, or the status bar | See the branch and the ↑↓ counts, stage and unstage files, read diffs, write a commit message and commit, pull and push. |
| AI Commit Message | Source Control → AI message | Pick one of four styles of suggested message built from your file names. It fills the message box; it doesn't commit. |
| Stage by hunk | Source Control → the icon on a file under Changes | Choose which blocks of a file go into the commit and which stay out. |
| Merge Branch | Source Control → Merge | Merge a local branch into the current one. If it conflicts, the same dialog lists the conflicted files, lets you resolve each one and lets you abort the merge. |
| Stash | Source Control → Stash | Put changes aside, with an optional message, then apply, pop or drop them. |
| Blame | Source Control → Blame | See who last changed each block of the open file and open that commit's diff. |
| File History | Source Control → File History | Browse the last 50 commits that touched the open file and open each diff. |
| Branch Comparison | Source Control → Compare | Compare two local branches: commits ahead and behind, and the changed files. |
| Diff viewer | Tap a file in Source Control; also from File History, Blame, Local History and Compare with… | Read added and removed lines with line numbers and +N −M totals; Swap the two sides. |
| Conflict resolver | Merge dialog → a conflicted file → Edit manually, or an interactive rebase that stops on a conflict → Resolve | Choose Ours, Theirs or Both for each conflicting block. |
| GitHub PRs & Issues | Editor → Git → GitHub PRs & Issues | Four tabs: PRs, Issues, CI and Alerts. Filter and open pull requests and issues; create, merge, close and comment. |
| New pull request | PRs tab → New pull request from … | Title, description, base and head branch, draft and labels. |
| Interactive rebase | GitHub PRs & Issues → ⋮ menu → Interactive rebase… | Plan, confirm and run a rebase, with a backup you can restore. |
| Cherry-Pick | GitHub PRs & Issues → ⋮ menu → Cherry-pick… | Apply commits, typed by hash, onto the current branch. |
| Local History | Command palette → Local History… | Browse earlier saved versions of the open file; copy or restore one. |
| Compare with… | Command palette → Compare with… | Diff the open file against disk, HEAD, the clipboard or another open tab. |
| Explorer marks and status bar | Always visible in a repository | See which files changed, and the branch with its ↑↓ counts. |
| Git Panel | Terminal → tools panel → Git Panel | Status, Branches, Log and Actions tabs: the built-in engine locally, the host's git over SSH. |
| Commit Changes | Project card → Commit | Stage and unstage files, discard a file's changes, amend, Commit or Commit & Push. |
| Git Settings | Project card → Git | Start tracking, link or create a remote, upload, download and check the remote; switch and create branches; History, Tags; your name on commits. |
| Commit History | Git Settings → History | The last 100 commits, with Revert, Reset Soft, Reset Hard and Cherry-pick. |
| Tags | Git Settings → Tags | Create a tag (annotated if you add a message), delete one, push tags. |
| Publish to Remote | Project card → Publish | Create an empty repository on GitHub, GitLab or Bitbucket and link it as origin. It doesn't push. |
| Clone | Projects page → Clone | Pick one of your repositories on GitHub, GitLab or Bitbucket and download it as a project. |
| Sign in with a code | Settings → Integrations → Connected Services → GitHub | Connect your GitHub account with a short code you approve in the browser. |
Clone, publish and connect GitHub
Git can only talk to a remote once PocketCode has your account. Cloning, publishing, pulling and pushing all use the account you connect under Connected Services; there is nothing to configure per repository.
Connect your GitHub account
- 1Open Settings → Integrations → Connected Services and choose GitHub. Its row says Sign in with a code.
- 2Tap Get a code from GitHub. PocketCode shows Your code.
- 3Tap Open GitHub, type the code on the page that opens (
github.com/login/device) and approve. - 4Keep the sheet open. Waiting for you to approve it… turns into a connected account by itself: there is no token to copy back.
You can
- Connect without ever handling a token: PocketCode uses GitHub's device flow, which needs no client secret and checks every few seconds until you approve.
- See what is asked before you approve: the permissions
repo,read:useranduser:email.repois what reaches private repositories. - Use that one account for clone, publish, fetch, pull, push, the GitHub PRs & Issues sheet and the CI feed.
You can't, and why
- Connect a second GitHub account (or a second account of any provider) on Free: the first account of each provider is free, more are Pro.Pro
- Use the code sign-in when GitHub hasn't switched it on for PocketCode's OAuth app: the sheet then says GitHub isn't offering it right now.Third party
Clone a repository
- 1On the Projects page tap Clone and choose Clone from GitHub, Clone from GitLab or Clone from Bitbucket. A service you haven't connected says Not connected — tap to connect; its Connect button takes you to Connected Services.
- 2Search your repositories (Search repositories… on GitHub) and tap Clone on one. One tap is all it takes: nothing else is asked, and the clone is always saved in PocketCode's own projects storage, which other apps can't see.
- 3Cloning Repository shows progress. Cancel stops it and removes the half-finished copy.
- 4The repository appears as a new project. If a project with that name already exists, the new one is called
name (2),name (3)…
You can
- Clone private repositories as well as public ones, from GitHub, GitLab or Bitbucket, as long as that account is connected.
- Get the full history: a clone is not shallow.
You can't, and why
- Clone from a URL, or a repository that isn't in your account's list.Not yet
- Clone from other hosts (GitHub Enterprise, self-hosted GitLab, Gitea, Codeberg…): only github.com, gitlab.com and bitbucket.org are supported.By design
- Clone without a connected account, even a public repository.Needs network
- Fetch submodules or Git LFS content: submodules aren't cloned, and LFS files stay as their small text pointers.Not yet
- See real progress: the bar moves in steps, not by bytes.Not yet
Publish a local project
Publish is for a project that so far only exists on your phone.
- 1Expand the project's card and tap Publish.
- 2Pick a connected service, then fill in Repository name (it starts as the project's name) and choose Public or Private. It starts as Public, so switch it to Private if the code isn't for everyone.
- 3Tap Create & Link.
You can
- Publish to GitHub, GitLab or Bitbucket.
- Get the same result from Git → Create on GitHub and connect, or link a repository you already have with Link a repository I already have (see Git on the project card).
You can't, and why
- Publish when no service is connected: the sheet says Connect GitHub, GitLab or Bitbucket in Services first, and you can't connect from there.Needs network
- Publish to another host.By design
origin. It does not commit or push. Your work goes up when you commit and then use Upload changes (or Push).Source Control in the editor
Source Control is the editor's Git panel, for the project that is open. It shows the branch and your changes and covers the everyday loop: stage, commit, pull, push. Branch work, stash, blame and history are the chips along the top.
Review and stage changes
The subtitle reads like main ↑2 ↓1 · Changes · 3: the branch, the commits you haven't pushed (↑) and haven't pulled (↓), and the number of changes. Files are grouped as Staged Changes, Changes and Untracked.
You can
- Tap a file to read its diff: added and removed lines in colour, with line numbers and
+N −Mtotals. Swap exchanges the two sides. - Move a file with Stage / Unstage on its row (Track & Stage for a new file), or a whole group with Stage All / Unstage All.
- Use the Refresh, Pull and Push icons in the header. Pull and Push run at once, without asking, and each ends with a message (Pushed or Push failed: …).
- See No changes detected (Working tree clean.) when there is nothing to commit.
You can't, and why
- Start a repository here: in a project that isn't one yet the panel just says No changes detected. Start tracking from Projects → Git or from the terminal's Git Panel.Not yet
- Fetch, create or switch branches, amend, discard a file's changes, edit tags or remotes: the editor has no button for them. Projects and the terminal cover most of them (see below).Not yet
- Trust the ↑↓ counters to be up to date: they change only after a pull or push, because the editor can't fetch.Not yet
Stage by hunk
Commit part of a file. Tap Stage by hunk on a file under Changes.
You can
- Each block of change shows as Hunk @ line N with its removed and added lines.
- Every hunk starts as Stage; tap Skip on the ones to leave out. N of M accepted counts them.
- The bottom button reads Stage all when every hunk is chosen and Stage N otherwise. It adds only those hunks to the next commit and leaves your file on disk untouched.
You can't, and why
- Split a hunk into single lines.Not yet
- Stage by hunk a new or already staged file: the icon appears only under Changes.Not yet
Commit and the suggested message
Type a message in Commit message… and tap Commit. The button is enabled only with a message and at least one file under Staged Changes.
You can
- Tap AI message for ideas. Choose a style (Conventional, Descriptive, Imperative or Emoji), tap a suggestion and Use this message: it fills the box, and you still tap Commit.
- Commit as yourself: editor commits carry the name and email saved in the repository, so set Your name on commits first (Projects → Git).
You can't, and why
- Amend the last commit from the editor: use Amend last commit in Projects → Commit.Not yet
Merge a branch
- 1Tap Merge. The Merge Branch dialog says Current: main and lists your other local branches; narrow them with Search branches....
- 2Pick a branch and tap Merge into main.
- 3A message tells you how it went: Fast-forward merge: …, Merged: …, Already up to date or, on a conflict, Merge has conflicts in: ….
- 4After a conflict the dialog changes to Merge conflicts detected with N file(s) need resolution. Tap a file and choose Accept current, Accept incoming or Accept both (each applies to every conflicting block of that file and stages it), or Edit manually to choose block by block. See Conflicts.
- 5Abort Merge gives the merge up: it asks Abort merge? (This will discard the in-progress merge and its conflict resolutions. This cannot be undone.) and Abort confirms. When the last file is resolved the dialog goes back to the branch list, and you commit from Source Control.
You can't, and why
- Merge a remote branch, or choose fast-forward-only, no-fast-forward or squash. To bring remote work in, use Pull.Not yet
Compare two branches
- 1Tap Compare (Branch Comparison).
- 2Choose Base and Compare, then tap Compare branches.
You can
- Read Ahead and Behind, Files, the commits (the list stops at 50, but Ahead is the real count) and the changed paths. Identical branches say No differences between these branches.
You can't, and why
- Open a file's diff from the comparison, or compare remote branches: only local branches are listed.Not yet
Stash
The Stash chip shows how many entries you have. Tap Stash and then Stash changes to put your changes aside; tap an entry to Apply, Pop or Drop it. Drop asks first: Drop stash? — This stash entry will be deleted permanently. This cannot be undone.
You can
- Type an Optional stash message before you confirm: it is saved with the entry and shown as its title in the list. Without one, Git writes its own WIP on … title.
- Read the result as a message: Stash saved: …, Stash applied and removed (Pop), Stash applied (kept) (Apply) or Stash removed (Drop).
You can't, and why
- Stash new (untracked) files: only changes to files Git already tracks are put aside.Not yet
- Pop a particular entry: Pop always applies and removes the newest one, whichever row you opened.Not yet
- Resolve conflicts when an applied stash conflicts: there is no resolver for it.Not yet
Blame
You can
- With a file open, tap Blame: consecutive lines from the same commit are grouped, with the author, Line N (or a range) and the 7-character hash.
- Tap a block, then View commit, to read that commit's diff for the file.
- Glance at the status bar: it can show author · how long ago for the line your cursor is on, next to the branch name. Tap either to open Source Control. Lines you haven't committed show Not Committed Yet.
You can't, and why
- Blame another branch or commit, or hide the status-bar blame: there is no setting.Not yet
- Read that relative time in your language: just now, 5 min ago, yesterday… are always in English.Not yet
File history
You can
- With a file open, tap File History for the last 50 commits that touched it (message, hash, author, age), and View diff for what each one changed in that file.
- An untouched file says No commit history for this file.
You can't, and why
- See more than 50 commits.By design
- Restore the file to an old version, or revert from the row: Revert lives in Projects → Git → History, and Local History covers unsaved work.Not yet
Marks in the explorer and the status bar
You can
- In a repository the file explorer marks each changed file (modified, added, untracked, deleted or renamed), marks folders that contain changes, and shows a footer with the branch, ↑↓ and the number of changed files. It reads the same status as Source Control.
- The status bar's branch name opens Source Control.
- Outside a Git repository there are no marks and no footer.
You can't, and why
—
Git on the project card
Several Git actions live on the project card in the Projects page, not in the editor: amend, switching and creating branches, tags, revert, reset, linking a remote and the name on your commits. The card itself is covered in the Projects page.
What the card tells you
Next to the project name the card shows a tag only when there is something to do.
| Tag | Meaning |
|---|---|
| Pull | The remote has commits you don't have. |
| Push | You have commits the remote doesn't have, or this branch was never pushed. |
| Changes | You have uncommitted changes (shown for projects that have a remote). |
| Conflict | Both sides have new commits, so you need to download first. It doesn't mean merge conflicts. |
Commit Changes
Tap Commit on the card. The sheet is titled Commit Changes and names the branch.
You can
- Move files between Staged (n) and Unstaged & Untracked (n) with each file's checkbox, or use Stage All / Unstage All.
- Type a Commit message and tap Commit. It needs a message and at least one staged file, and it stages nothing for you: with none staged it says No staged files. Use 'Stage All' to add changes.
- Tick Amend last commit (Modify the previous commit with the current changes): the button becomes Amend Commit.
- Tap Commit & Push to commit and upload in one go (only when the project has a remote).
- Throw away the uncommitted changes of a file Git already tracks with the Discard changes icon on its row. It doesn't appear for staged or new files.
- Author: the name and email saved in the repository; when there are none, those of your PocketCode account.
You can't, and why
—
Git Settings
Tap Git on the card. A status card says where the project stands, and the actions change with it.
| The card says | What you can do |
|---|---|
| Not tracked yet | Start tracking this project creates a local repository, with a .gitignore that leaves out .pocketcode/. Link a repository I already have creates it and sets origin to the URL you give. |
| Saved on this device only | Create on GitHub and connect (or GitLab, Bitbucket) makes an empty private or public repository and links it; it needs the account first (Connect a GitHub account first, in Settings). Link a repository I already have sets origin to a URL. |
| Connected | Upload changes (push), Download changes (pull) and Check the remote (fetch), plus the Branch, History and Tags rows. |
You can
- Branch: your local branches. Tap one to switch to it, or use Create new branch: Switch to this branch (ticked by default) moves you to it right away.
- Your name on commits: set the
user.nameanduser.emailthe repository stores. They start filled from the repository, your connected service or your account.
You can't, and why
- Switch branches or see History and Tags in a repository that has no remote yet: those rows appear only once there is an
origin. The terminal's Git Panel can switch branches locally.Not yet - Delete or rename a branch, or list remote branches: only local branches exist here.Not yet
Commit History, Revert and Reset
History (Commit History) lists the last 100 commits: message, 7-character hash, author and date. Tap a commit to reveal four buttons.
| Button | What it does |
|---|---|
| Revert | Makes a new commit that undoes that commit. History isn't rewritten. |
| Reset Soft | Moves the branch back to that commit and keeps everything after it as staged changes. |
| Reset Hard | Moves the branch back and throws away everything after it, uncommitted changes included. |
| Cherry-pick | Applies that commit on top of the current branch, with no hash to type. |
You can't, and why
- Reset mixed, or restore a single file from an old commit: only Reset Soft and Reset Hard exist.Not yet
Tags
Tags is a row of Git Settings and, like Branch and History, appears once the project has a remote.
You can
- Create Tag: a name such as
v1.0.0and an optional message. With a message the tag is annotated. - Delete a tag with its icon.
- Push Tags uploads them (only with a remote).
You can't, and why
—
Git Panel in the terminal
The terminal has its own small Git panel. It is the quickest way to start a repository or make a commit while you are already in the shell.
Git Panel
Open the terminal's tools panel (or its menu) and choose Git Panel. It has four tabs: Status, Branches, Log and Actions. In the local shell it works on the repository found by walking up from the folder you are in, without leaving your own workspace, using the built-in engine. Over SSH it runs git on the remote host.
You can
- Status: counts and lists of Staged, Modified and Untracked files, or Working tree is clean.
- Branches: tap a branch to switch to it, or New branch.
- Log: the last 30 commits.
- Actions: Commit changes (asks for a message and closes the panel), Pull, Push, Stash, Stash Pop, Fetch, Add All and Reset (takes everything out of the index).
- With no repository, No Git repository here offers Initialize repository.
You can't, and why
- Use the Diff action in the local shell: it exists only over SSH.By design
- Stash with a message, discard a single file, merge, rebase, tag or blame: not in this panel. It says so itself: Local panel backed by JGit; for full git use the editor's Source Control.Not yet
- Push or pull without a connected account: the panel shows Git: … with the reason and doesn't open a sign-in.Needs network
Conflicts
A conflict means two changes touched the same lines. PocketCode has two guided ways to resolve one: the Merge dialog of Source Control, for a merge, and the block-by-block resolver of an interactive rebase. For a pull, an applied stash or a cherry-pick that conflicts you deal with the conflict markers yourself.
File by file, after a merge
- 1Merge a branch from Source Control. If it conflicts, a message says Merge has conflicts in: … and the Merge dialog shows Merge conflicts detected, N file(s) need resolution and the list of files.
- 2Tap a file to open its choices: Accept current, Accept incoming, Accept both or Edit manually.
- 3The first three rewrite the whole file: every conflicting block takes that side (or both, the current one first), the markers disappear and the file is staged. A message confirms: Conflict resolved: ….
- 4Edit manually opens the block-by-block sheet described below: choose Ours, Theirs or Both for each block, then Apply.
- 5When no file is left in the list, the dialog goes back to the branch picker. The resolved files are staged: write a commit message and Commit.
You can
- Resolve the files one at a time and watch the count go down.
- Give up with Abort Merge: it asks Abort merge? and Abort confirms; the message says Merge aborted.
You can't, and why
—
Block by block, during a rebase
- 1When an interactive rebase stops on a conflict, every conflicting file shows Resolve.
- 2For each block choose Ours (Current (ours)), Theirs (Incoming (theirs)) or Both. The header counts your progress: N / M resolved.
- 3Tap Apply. The file is saved, and staged once no conflict markers are left. Blocks you didn't choose keep their markers.
- 4Back in the rebase, tap Continue (or Skip this commit, or Abort).
You can't, and why
- Choose the common ancestor's version of a block, or edit by hand inside the sheet.Not yet
Conflicts from a pull, stash or cherry-pick
In Projects, a pull that conflicts says: The same lines changed on both sides. Open the affected files, keep the version you want, and try again. That is the way to go here too.
You can't, and why
- Use a guided resolver for a conflict that comes from a pull, an applied stash or a cherry-pick: only the Merge dialog and the interactive rebase have one.Not yet
<<<<<<<, =======, >>>>>>>) in your files: open them and keep the version you want.Interactive rebase and cherry-pick
Interactive rebase and cherry-pick don't open from Source Control: they are in the GitHub sheet. Open GitHub PRs & Issues and use its ⋮ menu → Interactive rebase… or Cherry-pick….
origin remote is on github.com. A project with no remote, or whose origin is on GitLab, Bitbucket or another host, can't open rebase or cherry-pick. Projects → Git → History offers Cherry-pick on any commit you tap, with no hash to type, and reports the result in a message.Interactive rebase
- 1Open Interactive rebase…. The sheet starts in planning: nothing touches your repository yet.
- 2Choose Onto branch. It starts as
mainormasterwhen one exists and isn't your current branch. - 3For each commit pick Pick, Reword, Squash, Fixup or Drop, and use Edit message to change a commit message.
- 4If you have uncommitted changes the sheet warns you; switch on Stash my changes before starting to put them aside. After a rebase that finishes they stay in the stash (apply them from Stash); if you abort, they come back by themselves.
- 5Tap Start rebase. A confirmation lists the plan (for example two Pick and one Squash) and how many commits will be removed from the branch; they stay in the backup.
- 6If a commit conflicts, the rebase stops: Stopped at … · step N of M. Use Resolve on each file (see Conflicts), then Continue; or Skip this commit, or Abort. Each asks you to confirm.
- 7When it ends, Rebase complete (or Rebase undone after an abort) shows. Restore backup puts the branch back as it was before the rebase; Another rebase starts again.
You can
- Before anything changes, PocketCode saves your branch's current tip as
refs/pocketcode/rebase-backup/<branch>. - A rebase never starts with uncommitted changes unless you stash them first.
- Abort undoes everything (branch, index and working tree) and re-applies your own stash.
- The plan is saved inside
.git, so Continue and Skip this commit still work if the app was closed in between. - Restore backup moves the branch back to the saved tip, but only with a clean working tree; commits made after the rebase are then left only in the Git reflog.
You can't, and why
- Reorder commits: the sheet doesn't allow it.By design
- Use the Edit action: Git would create a new commit instead of amending, so it isn't offered.By design
- Start with Squash or Fixup on the first commit you keep, or drop every commit: the sheet refuses both.By design
- Rebase onto a remote branch, or rebase a branch other than the one you are on: only local branches are offered, and a detached HEAD is refused.Not yet
- Open it from Source Control, from a project with no remote, or from one whose
originisn't on github.com.Not yet
Cherry-pick
- 1Open Cherry-pick…, type a commit hash in Commit hash and tap Add. Add as many as you need; they show as chips.
- 2Tap Cherry-Pick (or Cherry-pick N commits) and confirm: Apply N commits onto the current branch, in order?
- 3The sheet reports Cherry-picked … successfully or Cherry-pick failed: ….
You can't, and why
- Pick commits from a list: you have to know and type the hash, and the only check is that it has no spaces.Not yet
- Rely on the order when you add several hashes: they are started together, so the confirmation's “in order” isn't guaranteed. Cherry-pick one at a time when order matters.Not yet
- Trust New commit: …: it shows the hash you typed, not the id of the commit that was created.Not yet
- Resolve a conflict: a conflicting cherry-pick just reports a failure, with no resolver.Not yet
GitHub: pull requests, issues, CI and alerts
GitHub PRs & Issues talks to the GitHub repository of the project open in the editor. It reads the project's origin remote and uses the account you connected under Connected Services; the requests go straight from your phone to api.github.com. The header shows owner/repo, an icon to open the repository in the browser, and the ⋮ menu.
Getting started
You need a project whose origin is on github.com and a connected GitHub account. With no project open the sheet says Project path not set — open from editor; the other cases are in Troubleshooting. It has four tabs.
| Tab | What it shows |
|---|---|
| PRs · N | The repository's pull requests, most recently updated first. |
| Issues · N | Its issues (pull requests are left out). |
| CI | The checks of the pull request you opened. |
| Alerts · N | Your GitHub notifications; N is the unread count, loaded the first time you open the tab. |
Pull requests
You can
- Filter with Open, Mine, Review requested, Closed or All. Mine and Review requested are filtered on your phone against your GitHub login.
- Read the list: state (Open, Draft, Merged, Closed), number, title, author, age, requested reviews and labels.
- Open one: Summary (description,
head → base, changed files,+N / −M, commits, assignees, labels, Checks and Reviews with their state), Files · N (paths with+/−) and Comments · N. - See why it can't merge: a banner reads Can't merge: … followed by the reasons that apply (merge conflicts, a failing check, changes requested).
- Write a comment… posts a conversation comment. Close PR closes the pull request.
- Merge offers Merge commit, Squash and merge and Rebase and merge. The app sends the head commit it showed you, so if someone pushed in the meantime GitHub refuses instead of merging commits you haven't seen.
- New pull request from … (needs a current branch): title, description, Base branch and Head branch, Create as draft and labels, then Create pull request.
You can't, and why
- Submit a review (approve or request changes), comment on a line, or read the pull request's diff: reviews are shown but read-only, and Files lists paths without opening them.Not yet
- Pick reviewers when you create a pull request.Not yet
- Reopen a pull request, edit its title or description, turn on auto-merge or update its branch.Not yet
- Use GitLab merge requests, Bitbucket pull requests or GitHub Enterprise: only github.com repositories are read.By design
Issues
You can
- Filter with Open, My issues (assigned to you), Closed or All.
- Read the list (state, number, comment count, author, labels) and open one for its body, dates, assignees, labels, milestone, comments and a comment box.
- Close issue closes it as completed. Create issue takes a title, a description and labels.
You can't, and why
- Choose a milestone or assignees when you create an issue, reopen one, edit it, label it afterwards or search.Not yet
CI
You can
- Open a pull request, then the CI tab: the checks of its head commit (GitHub Actions runs, other apps' checks and classic statuses) under one summary, such as All checks passed, Some checks failed or Checks in progress.
You can't, and why
- See CI without opening a pull request first (the tab says Select a PR to see its CI status), read logs, or re-run or cancel a run.Not yet
origin once and puts it in the Backend Manager's status feed. It needs that service connected and doesn't refresh on its own.Alerts
You can
- Open Alerts: your GitHub notifications where you take part. Each row has an icon for its kind (review requested, approved, changes requested, merge, comment, assigned, mention, CI passed or failed, release), the title and repo · reason.
- Tap an unread one to mark it read, or Mark all read. When none are left it says You're all caught up.
You can't, and why
- Open the pull request or issue behind a notification: tapping only marks it as read.Not yet
- See notifications with a fine-grained token: GitHub only shows them to a classic token or an OAuth sign-in, and the sheet says so.Third party
Local History
Local History keeps earlier versions of a file on your phone, with no Git, no network and no account. It is free. Open it from the command palette: Local History….
What it keeps
You can
- A version is saved after every successful save, and only when the text differs from the last saved version. It works for project files and for files you opened from outside the project.
- It keeps up to 50 versions per file and 50 MB in total, measured compressed. Past the total, the oldest versions of any file go first. There is no expiry by time.
- Versions live in PocketCode's private storage, never inside your project, so they never show up as Git changes. Renaming or moving a file takes its history along.
You can't, and why
- Keep versions of large files: the editor opens files from 512 KiB, 10,000 lines or a 2,000-character line in its light mode, and those aren't saved.By design
- Change the limits, or pin or label a version.By design
Browse and restore
- 1Open the file and choose Local History…. The subtitle shows how many versions there are, for example 12 versions.
- 2Each row shows when it was saved and its size. Tap one to see the difference between that version and the current text.
- 3Copy this version copies its text. Restore this version puts it into the editor as one edit you can undo. Nothing is written to disk until you save.
You can't, and why
- Compare two old versions with each other: they are always compared with the current text.Not yet
Compare with…
Open the command palette and choose Compare with… to diff the open file against something else. The result is read-only.
Pick what to compare with
You can
- Pick the base: On disk (The saved version of this file), HEAD (The last git commit), Clipboard (The copied text) or Another open tab.
- A base that isn't available says why: No Git repository, The clipboard is empty or No other tabs are open.
- The diff opens titled file ↔ base; Swap exchanges the two sides.
You can't, and why
- Edit from the diff or see it in two columns: it is one unified list of changed lines.By design
Free and Pro
Git has no plan gates of its own. No Git operation, GitHub feature, Local History, Compare with… or terminal Git Panel is locked behind Pro, and the plan puts no cap on repositories, branches, commits or operations. Two limits around it do depend on the plan.
| Feature | Free | Pro |
|---|---|---|
| Source Control, stash, blame, file history, compare branches | Included | Included |
| Interactive rebase, cherry-pick, conflict resolver | Included | Included |
| GitHub pull requests, issues, CI and alerts | Included | Included |
| Local History | Included: 50 versions per file, 50 MB in total | Same |
| Git Panel in the terminal, the project card's Git sheets, clone and publish | Included | Included |
| Projects of your own (new, import, open folder, clone from GitLab or Bitbucket) | 1. The sample projects don't count | No limit |
| Connected accounts per provider (GitHub, GitLab, Bitbucket…) | 1 | No limit |
Privacy and security
- The token stays on the phone. The token you get from Sign in with a code is saved encrypted with the Android Keystore, separately for each PocketCode account and each provider account. Signing out doesn't delete it; the app just switches to another account's store.
- Where the token goes. Git sends it only to github.com, gitlab.com and bitbucket.org, matched on the exact host: a remote on any other host gets no credentials. The GitHub PRs & Issues sheet sends it to
api.github.comstraight from your phone. - Logging in with GitHub is a different thing. If you sign in to PocketCode itself with GitHub, that GitHub token is also saved on PocketCode's servers, and on the device as a GitHub key (it serves Copilot and, as a fallback, cloning). The token that push, pull and the GitHub sheet use is the one from Connected Services, which is stored only on the device.
- Hooks never run. Git hooks and filters don't execute, and when you import a project (ZIP, template, folder) its
.git/configis stripped of anything that could run a command and its hooks are emptied. This is a security decision. - Local History stays on the device, in the app's private storage and outside the project, so it isn't part of your Git changes.
- A project ZIP includes your history. Export on a project card includes the
.gitfolder, so everything you committed travels with the file. - What a commit exposes. Each commit carries the name and email set for the repository (or your PocketCode account's, when you commit from Projects). Anyone who can read the repository sees them. Commits are not signed.
Limitations
What doesn't work, so it doesn't catch you by surprise. The badge says why.
- No SSH remotes.
git@…andssh://addresses aren't supported; use the repository's HTTPS address. PocketCode says so before it tries.By design - Credentials go to three hosts only: github.com, gitlab.com and bitbucket.org. Remotes on GitHub Enterprise, self-hosted GitLab, Gitea, Codeberg or Azure DevOps receive none, so private repositories there fail.By design
- Pull requests, issues, CI and alerts are GitHub.com only.By design
- No Git LFS, no submodules, no commit signing (GPG or SSH). LFS files stay as small text pointers, clones don't fetch submodules, and commits are not signed.Not yet
- Git hooks never run, and the hooks of imported repositories are deleted.By design
- The local terminal has no
gitprogram. Its Git Panel uses the built-in engine, which does fewer things thangit. Over SSH the host's owngitis used.By design - Only local branches appear in the merge, compare and rebase lists. You can't create a local branch from a remote one, and nothing deletes or renames branches.Not yet
- Source Control starts no repository, fetches nothing, and can't create or switch branches, amend, discard, tag or edit remotes. Projects and the terminal cover most of that.Not yet
- Guided conflict resolution only for a merge and a rebase. The Merge dialog and the interactive rebase have one; a pull, an applied stash or a cherry-pick that conflicts leaves markers for you to edit.Not yet
- Stash: new files aren't included, and Pop always takes the newest entry.Not yet
- Rebase can't reorder commits or use Edit.By design
- Rebase and cherry-pick open only from the GitHub sheet, and only when
originis on github.com.Not yet - Cherry-pick: the hash is typed by hand, several hashes aren't strictly ordered, New commit shows the typed hash, and conflicts have no resolver.Not yet
- Pull request reviews can't be submitted, line comments can't be written and the pull request's diff can't be read. Reviewers, assignees and milestones can't be chosen when you create something.Not yet
- GitHub lists stop at 300 items; notifications load six pages of 50.By design
- Alerts need a token GitHub allows to read notifications: fine-grained tokens are refused.Third party
- GitHub's request limit: when it is reached the sheet tells you to try again in a few minutes.Third party
- Sign in with a code works only while GitHub has the device flow switched on for PocketCode's OAuth app; otherwise the sheet says GitHub isn't offering it.Third party
- Clone, fetch, pull, push, publish and everything on GitHub need a connection. Everything else works offline.Needs network
- Terminal Git Panel: no Diff locally, no stash message, no discarding a single file, no merge, rebase, tags or blame.Not yet
- Projects: no deleting or renaming branches, no mixed reset, no restoring a file from a commit.Not yet
- Local History: 50 versions per file and 50 MB in total, with no expiry by time, and nothing is saved for files in light mode (large files).By design
Troubleshooting
Each title is the message the app shows. Where the app shows nothing, the title describes the situation. In the GitHub sheet a banner reads what failed, then why.
Connecting GitHub
“The code expired before it was approved. Ask GitHub for a new one.”
You took longer than about 15 minutes. Tap Try again to get a new code, then approve it.
“The request was rejected on GitHub. Nothing was saved.”
The approval was denied on GitHub's page, so nothing was connected. Tap Try again and approve this time.
“GitHub isn't offering the code sign-in right now. Paste a token instead — it works exactly the same.”
The code request failed. GitHub may not have switched the code sign-in on for PocketCode's OAuth app, which depends on GitHub's setup and not on your phone; the same message also appears when the request can't get through, for example with no connection. Check your connection, then try again later.
“GitHub didn't finish the sign-in. Try again, or paste a token instead.”
The sign-in ended without a token. Tap Try again and approve the new code.
Clone, push and pull from Projects
“This remote uses SSH, which is not supported. Use the HTTPS address of the repository.”
PocketCode only talks to remotes over HTTPS. Link the repository with its https://… address; a repository you clone from the Clone list already uses it.
“This project has no remote yet. Link one in Git settings first.”
Open Git on the project card and use Link a repository I already have or Create on GitHub and connect; or use Publish.
“No account connected for GitHub. Connect one in Settings to upload or download.”
Connect the account first: Settings → Integrations → Connected Services.
“GitHub rejected the credentials. Reconnect the account in Settings.”
GitHub no longer accepts the saved token, for example because it expired or was revoked. Connect the account again under Connected Services.
“Could not reach GitHub. Check your connection and try again.”
Clone, fetch, pull and push need a connection. Local work doesn't.
“The remote rejected the upload. Download the remote changes first, then upload again.”
The remote has commits you don't have. Tap Download changes, then Upload changes again.
“Your branch and the remote have both changed.”
Download the remote changes first, then upload again: Download changes, then Upload changes.
“This project and the remote have no shared history.”
It usually means the folder already had commits before linking the remote. Clone into an empty folder, or link a different remote.
“The same lines changed on both sides.”
Open the affected files, keep the version you want, and try again. A pull has no conflict resolver; a merge started in the editor has one in the Merge dialog (see Conflicts).
GitHub PRs & Issues
“The "origin" remote is not on GitHub (…).”
The sheet works only with github.com. The host in brackets is the one PocketCode found in origin.
“This project has no "origin" remote. Add a GitHub remote to see its pull requests and issues.”
Use Git → Link a repository I already have, or Publish, on the project card.
“Connect your GitHub account in Services to see the pull requests and issues of owner/repo.”
Tap Connect GitHub account on the No GitHub account connected screen, or go to Settings → Integrations → Connected Services.
“GitHub rejected the token. Reconnect your GitHub account in Services.”
The saved token was refused. Connect the account again under Connected Services.
“The connected account doesn't have permission for this: …”
The account can read the repository but not do that action. The reason follows the colon.
“Not found. If the repository is private, the connected account may not have access to it.”
Check that the connected account is the one that can open that repository on GitHub.
“GitHub rejected the data: …”
GitHub didn't accept what was sent. The reason follows the colon.
“GitHub can't do it right now: …”
GitHub refused the action as things stand now. The reason follows the colon; if the pull request changed since you opened it, open it again and retry.
“GitHub's request limit was reached. Try again in … min.”
Wait the minutes it says. The full screen is titled GitHub rate-limited requests; tap Retry when the time has passed.
“GitHub is having problems (HTTP …). Try again later.”
GitHub itself answered with an error. Nothing on your phone is wrong.
“Couldn't reach GitHub. Check your connection.”
The GitHub sheet needs a connection; the rest of Git doesn't.
“GitHub only shows notifications to a classic token or an OAuth sign-in with the "notifications" scope; fine-grained tokens can't read them.”
Only the Alerts tab is affected; PRs, Issues and CI keep working.
“The pull request was created, but its reviewers or labels couldn't be added”
Your pull request exists on GitHub; only the extras failed. Open it on GitHub to add them.
Interactive rebase
“You are not on a branch (detached HEAD). Switch to a branch first.”
Switch to a branch (Projects → Git → Branch, or the terminal's Git Panel) and start again.
“There are uncommitted changes: …”
Commit them, or switch on Stash my changes before starting.
“There is already a merge or rebase in progress in this repository.”
Finish or abort it first. For a rebase, the sheet has Continue, Skip this commit and Abort.
“The rebase would overwrite files that are not tracked: …. Move or commit them first. Nothing was changed.”
Move or commit the files the message lists, then start again.
“The branch changed since the list was loaded. Load it again.”
The branch moved on after the plan was loaded. Reopen Interactive rebase… to reload it.
“Git could not apply … so it undid the rebase. The branch is as it was.”
Nothing was lost. The commit the message names could not be applied onto the target branch.
“After resolving, this commit is empty. Skip it to carry on.”
Your resolution left nothing to apply. Tap Skip this commit.
“The first commit you keep cannot be Squash or Fixup: there is no earlier commit to meld it into.”
Give the first commit you keep Pick or Reword.
“You are dropping every commit. Keep at least one.”
Change at least one commit away from Drop.
“There is no rebase backup for this branch.”
Restore backup only works on a branch that PocketCode rebased and whose saved tip still exists.
In the editor and the terminal
“Push failed: …”, “Pull failed: …” or “Commit failed: …” in the editor
The message after the colon is the reason. Push and pull need your connected account; the editor never opens a sign-in. Projects (Upload changes / Download changes) and the terminal's Git Panel run the same actions and show the error in their own words.
“Merge has conflicts in: …”
The merge stopped on conflicts. Open Merge again: the dialog lists the files and lets you resolve each one or Abort Merge (see Conflicts).
Source Control says No changes detected but I changed files
Either the working tree is clean or the project isn't a repository yet. In Projects → Git, Not tracked yet means you need Start tracking this project.
“No Git repository here”
The terminal's Git Panel found no .git in the folder you are working in or the folders above it inside your workspace. Tap Initialize repository.
“Git: …”
The reason follows. Push and pull need your connected account; the panel never opens a sign-in itself.
Next