GitHub Integration: Complete Guide
Learn how to connect your GitHub repositories and manage code directly from PocketCode on your mobile.
Git and GitHub from Your Mobile
Managing repositories from mobile used to be complicated. PocketCode has Git built in (the JGit library, nothing to install), so the everyday loop works from your phone: clone, stage, commit, push and pull requests. This guide follows the real screens; the Git & GitHub docs cover each one in detail.
Initial Setup
1. Connect Your GitHub Account
- Open Settings → Integrations → Connected Services and choose GitHub
- Tap Sign in with a code, then Get a code from GitHub
- Tap Open GitHub, type the code PocketCode shows you on the page that opens (
github.com/login/device) and approve it (OAuth device flow) - Keep the sheet open: it connects by itself once you approve
There is no token to copy. The code lasts about 15 minutes; if it expires, ask for a new one. On the Free plan the first account of each provider is included; connecting more is Pro.
2. Clone a Repository
- Go to Projects and tap Clone
- Choose Clone from GitHub (or GitLab / Bitbucket). If you haven't connected it yet, tap Connect first
- Pick one of your repositories (you can search them) and tap Clone
The repository appears as a new project. If the name already exists, the clone gets a suffix such as repo (2). You clone from the list of your own repositories, over HTTPS only: SSH remotes and cloning from a pasted URL aren't supported. The local terminal has no git program, so there is no git clone there; use the Clone tile.
Basic Workflow
Make Changes
- Edit files normally
- In a repository the file explorer marks the files that changed, and the status bar shows the branch with its ↑↓ counts
- Open Source Control (editor menu → Git, or
Ctrl+Shift+Gon a physical keyboard, or tap the branch name in the status bar) and tap a file to view its diff: added and removed lines in one list
Commit and Push
In the editor:
- Open Source Control
- Review the changes and Stage the files you want (Stage All for the lot, or Stage by hunk for just part of a file)
- Write a commit message and tap Commit
- Tap the Push icon in the header
The editor doesn't show a success or error message after a commit, push or pull: judge the result by the lists and the ↑↓ counters. If a push seems to do nothing, repeat it from Projects, which does show the error.
From the project card in Projects you can also tap Commit, tick the files, write the message and tap Commit & Push (when the project has a remote). Set Your name on commits first under Git.
The AI message button suggests commit messages in four styles, but it is not AI: it is a local, rule-based suggestion built from the names of the files you changed, with no model and no key involved.
Advanced Features
1. Branch Management
- Create and switch: on the project card tap Git, then Branch. Tap a branch to switch to it, or Create new branch. These rows appear once the project has a remote (
origin); the terminal's Git Panel can also switch and create branches locally - Merge: in Source Control tap Merge, pick one of your local branches and tap Merge into main (or whichever branch you are on)
- Compare: Compare shows how far apart two local branches are: commits ahead and behind, and the changed files
Only local branches appear in these lists.
2. Pull Requests
Open GitHub PRs & Issues from the editor's Git menu. It works with projects whose origin is on github.com and uses the account you connected.
- Make your changes in a branch
- Push the branch (Upload changes in the project's Git sheet)
- In the PRs tab tap New pull request from …
- Fill in title and description, choose the base and head branch (and mark it a draft if you want)
- Tap Create pull request
The same sheet has Issues, CI and Alerts tabs. From a pull request you can Merge (merge commit, squash or rebase), Close PR and write a comment.
3. Resolve Conflicts
PocketCode has one guided conflict resolver, and it lives inside the interactive rebase: for each conflicting block you choose Ours, Theirs or Both. For a merge or a pull that conflicts there is no resolver: the conflict markers (<<<<<<<, =======, >>>>>>>) stay in your files and the editor doesn't list the conflicted files for you. Open the affected files, keep the version you want, remove the markers, then stage and commit.
4. Stash Changes
Save changes temporarily from Source Control: tap Stash, then Stash changes. Tap an entry to Apply, Pop or Drop it. Keep in mind that new (untracked) files are not stashed, the stash message isn't saved, and Pop always takes the newest entry.
5. Rebase and Cherry-pick
Interactive rebase (Pick, Reword, Squash, Fixup, Drop, with a backup you can restore) and Cherry-pick (by commit hash) open from the ⋮ menu of the GitHub sheet, and only when the project's origin is on github.com. In Projects → Git → History, tapping a commit offers Revert, Reset Soft, Reset Hard and Cherry-pick. Reset Hard runs without asking and discards uncommitted work.
Common Workflows
Workflow 1: Quick Fix
- On the project card open Git → Branch and switch to
main - Tap Download changes to pull the latest
- Make the fix in the editor
- Tap Commit, write the message and tap Commit & Push
Workflow 2: New Feature
- Switch to
main, tap Download changes, then Create new branch (e.g.feature/new-api) with the switch on - Develop, committing often from Source Control
- Tap Upload changes, then New pull request from … in the GitHub sheet
Workflow 3: Hotfix
- Switch to your production branch and create
hotfix/critical-bug - Make the fix and commit it
- Switch back to the production branch, open Source Control → Merge, pick the hotfix branch and tap Merge into …
- Tap Upload changes
Best Practices
Commits
✅ Good messages:
feat: add Google login
fix: correct email validation
docs: update README with instructions
refactor: simplify search function❌ Bad messages:
changes
fix
wip
asdfghBranches
Use descriptive names:
feature/feature-namefix/bug-descriptionhotfix/critical-issuerefactor/refactor-name
Before Push
- ✅ Review your changes
- ✅ Run tests (if they exist)
- ✅ Download remote changes first (avoid conflicts)
- ✅ Write descriptive message
Advanced Configuration
Your token and where it goes
- The token you get from Sign in with a code is saved encrypted on your phone (AES-256-GCM with a key from the Android Keystore), separately for each PocketCode account and each provider account
- Git sends it only to github.com, gitlab.com and bitbucket.org (exact host match). The GitHub sheet sends it to
api.github.comstraight from your phone. A remote on any other host (GitHub Enterprise, a self-hosted GitLab, Gitea…) gets no credentials, so private repositories there fail - If you sign in to PocketCode itself with GitHub, that GitHub token is also stored, encrypted (AES-256-GCM), on PocketCode's backend: the backend uses it to list your repositories, and the app can recover it from there
.gitignore
Start tracking this project (project card → Git) creates a local repository with a .gitignore that leaves out PocketCode's own .pocketcode/ folder. Add your own rules by editing that file:
# Dependencies
node_modules/
venv/
__pycache__/
# Build outputs
dist/
build/
*.pyc
# Environment
.env
.env.local
# IDE
.vscode/
.idea/
# OS
.DS_Store
Thumbs.dbWhat isn't supported
- SSH remotes (
git@…,ssh://): use the HTTPS address - Git LFS (files stay as small text pointers), submodules and commit signing
- Git hooks: they never run
- Pull requests, issues, CI and alerts for GitLab, Bitbucket or GitHub Enterprise: those need a github.com repository
- Lists in the GitHub sheet stop at 300 items
Collaboration
Code Review from Mobile
- Open the PR
- See its existing reviews, checks and approval status
- Add a comment to the PR conversation
Submitting a formal approve/request-changes review, and line-anchored comments, aren't wired into the app yet — do those from GitHub's web UI. What PocketCode shows today is the PR's review state and conversation.
Discussions
- Write comments on the PR or issue conversation
- Mention collaborators with @username
Troubleshooting
"Can't push"
If the app says "The remote rejected the upload. Download the remote changes first, then upload again.":
- Tap Download changes
- Resolve conflicts if any (see above)
- Tap Upload changes again
"I cloned the repo but don't see files"
Check:
- The clone is a new project on the Projects page: open it from there
- Is the repository empty?
- Files tracked with Git LFS arrive as small text pointers, not the real content
"Changes don't appear on GitHub"
A commit alone doesn't upload anything, and Publish only creates and links the empty repository. If the status bar shows commits ahead (↑) or the project card says Push, tap Upload changes (or the Push icon in Source Control).
Conclusion
With PocketCode you have the everyday Git and GitHub workflow on your mobile. No more excuses for not making that urgent commit.
Next tutorial: Automatic deploy from GitHub with Vercel
Questions? Write to [email protected]
Happy coding! 🚀
Code Editor
Quick answers on this
Keep reading
- FeatureVersion Control: Git Built into PocketCodeGit without leaving the editor: stage, commit, branches, merge, stash and GitHub pull requests, built into PocketCode.6 min
- TutorialDcoder shut down: what to use instead on AndroidDcoder shut down on 31 March 2026. What happened, and what to use now on Android for Python, web code or several languages, with the limits of each.7 min
- TutorialAn IDE for Android tablets: what a bigger screen changes, and what to useAn Android tablet with a keyboard can be a real coding machine. What to look for in a tablet IDE, the options, and how PocketCode uses the extra space.5 min

