Git version control reference
The Git panel manages version history for the current app workspace. For the full team workflow, see Collaborate with Git and Qixin Code.
When to use this page
- You are unsure about the order of Stage, Commit, Pull, and Push.
- You need Qixin Code or another remote repository.
- You want to inspect an old commit, create a branch, or recover from authentication failure.
- You want AI to draft a commit message and need to know which changes it reads.
Where to go
Select the Git icon in the editor's left Activity Bar. Its badge is the number of current uncommitted changes.
The upper area contains:
- Current branch menu and branch creation.
- Remote menu, Qixin Code, and Add remote.
- Commit message input.
- Refresh, Fetch, Pull, Push, and Commit actions.
The lower area switches between Changes and History.
Changes
Changes separates unstaged and staged files. Select a file to inspect its diff.
| Action | Effect | Risk |
|---|---|---|
| Stage | Include a file in the next Commit | Does not Push automatically |
| Unstage | Remove it from the next Commit while keeping edits | Low |
| Discard | Drop unstaged edits; deletes an untracked file | Irreversible |
| Commit | Record staged changes on the current local branch | Still local only |
| Push | Send local branch commits to the selected remote | Changes shared team state |
Stage only files that belong to one business purpose. Inspect every diff before Commit and remove secrets, customer data, and machine-specific configuration.
Branches and history
Branches
- The branch menu lists local and fetched remote branches.
- Create and checkout new branch fits an independent feature or fix.
- Save editor content and resolve uncommitted changes before switching.
History
History shows commits, the current HEAD, branches, and tags. Double-click a commit to inspect that version.
A history checkout enters detached HEAD. Create a branch before continuing development from that point. When the workspace has changes or conflicts, Theseus asks whether to keep, stash, or discard them. Confirm only after understanding the effect.
Remotes and synchronization
Qixin Code
Enable it during app creation, or connect an existing app from the remote menu. It requires a Qixin sign-in, a valid account name, and appropriate access.
Connecting a remote does not automatically commit every local edit. You still choose Stage and Commit.
Custom remote
Choose Add remote and enter a name and URL. Never embed a username, password, or token in the URL.
Fetch, Pull, and Push
| Action | Purpose |
|---|---|
| Fetch | Update remote branch information without changing the workspace |
| Pull | Integrate the current remote branch locally; conflicts are possible |
| Push | Upload current branch commits |
Fetch and Pull before work. Commit and Push after verification. Reconfirm the current branch and remote immediately before Push.
AI-generated commit messages
Stage the intended files first, then use the generation action. AI should draft from the staged diff only. Review and edit the message before Commit.
A good message describes the business outcome rather than only saying update or listing a file name. An AI-generated message does not replace diff review.
Credentials
- For HTTPS authentication failure, enter the username and access token through the panel prompt and retry.
- SSH remotes use the local SSH key and agent.
- Never put credentials in a remote URL, app file, commit message, or AI conversation.
The Git panel is available only in the desktop editor. Runtime pages and runtime-only environments do not provide project Git operations. ZIP export does not include Git history.
What success looks like
- Current branch and remote match the team plan.
- A Commit contains only the staged task files, and remaining workspace edits are understood.
- The same commit appears remotely after Push, and teammates can Pull it.
- History explains the business changes with clear messages.
- After Pull on another development machine, the app opens, builds, and can be verified.
Common issues
There are uncommitted changes before Pull
Commit them, or explicitly choose stash, keep, or discard. Do not force a Pull before understanding conflict consequences.
Push is rejected
Fetch and check for new remote commits. Pull and resolve conflicts when needed, rerun validation, and Push again.
Authentication fails
For HTTPS, check access-token permissions. For SSH, check the key and agent. Do not bypass the problem by putting a token in the URL.
I want to recover after Discard
Discard has no guaranteed undo, and untracked files are deleted. Commit, back up, or explicitly confirm that important edits are no longer needed first.
I cannot Push after switching to an old commit
You are likely in detached HEAD. Create a branch from that commit and decide how it will be merged.
How AI can help
AI can explain diffs, suggest commit boundaries, draft messages, and analyze conflicts. For example:
Review current Git status and diffs without changing them. Suggest the smallest commits by business purpose, identify files that should not be committed, and draft a message for staged changes. Do not Stage, Commit, Pull, or Push.
What a person must confirm
- Current branch, remote, and repository ownership are correct.
- Staged content contains no credentials, customer data, or unrelated changes.
- Pull, Discard, stash, branch switching, and history checkout will not lose work.
- Commit, Push, and team merge are authorized and validated.