Git for GitHub workflows
A GitHub workflow spans more than github.com, and the reference Git server is the second of four picks because it handles the local layer GitHub cannot reach. This Anthropic reference server works on a repo path on disk, status, diffs, commits, branches, and history, so an agent can stage and commit work directly.
It ranks second behind the hosted server, but the two are complementary rather than competing. GitHub owns the platform side; Git owns the checkout side.
How Git fits
git_status reports the working tree, git_diff_unstaged and git_diff_staged show changes around staging, and git_diff compares branches or commits, the local view of a change an agent is reviewing. git_add stages, git_commit records with a message, git_reset unstages, and git_create_branch with git_checkout isolates work. git_log, git_show, and git_branch read history and list branches. That covers committing locally before anything is pushed.
The siblings cover the other layers of a GitHub workflow. GitHub is the hosted core, reading repo files, searching code, and managing issues, pull requests, and Actions, which is why it ranks first. GitLab is the pick when a second forge is in the mix, and CircleCI handles continuous integration when CI is where the question lands. The Git server reaches none of those; it operates on the local repo only. Use it for the commit-locally step and let GitHub handle the hosted side.
Tools you would use
| Tool | What it does |
|---|---|
| git_status | Shows the working tree status. |
| git_diff_unstaged | Shows changes in the working directory not yet staged. |
| git_diff_staged | Shows changes that are staged for commit. |
| git_diff | Shows differences between branches or commits. |
| git_commit | Records staged changes to the repository with a message. |
| git_add | Adds file contents to the staging area. |
| git_reset | Unstages all staged changes. |
| git_log | Shows the commit logs with optional date filtering. |
| git_create_branch | Creates a new branch from an optional base. |
| git_checkout | Switches to the given branch. |
FAQ
- What does the Git server do that GitHub's server cannot?
- It works on the local checkout. GitHub operates on the hosted platform, pull requests, issues, code search, Actions, while the Git server handles status, diffs, commits, and branches on the repo on disk, so an agent can stage and commit before pushing.
- Why is Git second and GitHub first for GitHub workflows?
- Because the task centers on the hosted platform, which GitHub's server owns: PRs, issues, code search, and Actions. The Git server covers the local commit layer that GitHub cannot reach. The two pair up rather than overlap.