[Claude Code](https://www.deployhq.com/guides/claude-code) turns your terminal into a Git-aware coding partner. It reads your repository history, understands diffs, generates context-aware commit messages, resolves merge conflicts, and creates pull requests — all through natural language. This guide covers the practical Git and source control operations you can perform with Claude Code, from everyday commits to worktrees and GitHub automation, how the `Co-Authored-By: Claude` attribution works (and how to change or remove it), and how to connect everything to an automated deployment pipeline with [DeployHQ](https://www.deployhq.com).

**In short:** Claude Code drives your local `git` binary — there is no separate Git plugin to install. Ask in plain English (commit these changes, resolve this conflict, open a PR) and it runs real Git commands that respect your `.gitconfig` and hooks. By default, commits get a `Co-Authored-By` trailer naming the Claude model that made them. To remove it, set `"attribution": false` in `~/.claude/settings.json` (older versions: set `attribution.commit` and `attribution.pr` to empty strings). The old `includeCoAuthoredBy` key is deprecated.

If you are new to the tool itself, start with our [Claude Code setup walkthrough](https://www.deployhq.com/blog/getting-started-with-claude-code-the-ai-coding-assistant-for-your-terminal) before reading on — this guide assumes Claude Code is already installed and authenticated. Keep our [Claude Code cheatsheet](https://www.deployhq.com/cheatsheets/claude-code) open alongside for a single-page reference to slash commands, hooks, and MCP patterns.

## What Git Is, and Why Claude Code Uses It

Git is the version control (source control) system that records every change to your project as a series of **commits** — saved snapshots with a message describing what changed and why. When Claude Code says it will commit changes, it means it will stage the files it edited and record a commit in your local repository, exactly as `git add` and `git commit` would. Nothing reaches GitHub, GitLab, or Bitbucket until a `git push`. If terms like _staging_, _remote_, or _HEAD_ are unfamiliar, our [Git glossary](https://www.deployhq.com/git/glossary) explains each one in a sentence or two.

Git itself is optional for Claude Code, but almost every workflow in this guide depends on it, and Claude's built-in commit and pull request instructions only matter inside a Git repository. If `git --version` fails on your machine, follow our [step-by-step Git install guide](https://www.deployhq.com/git/install-git) first.

**On native Windows** , [Git for Windows](https://git-scm.com/downloads/win) is recommended rather than required: it provides Git Bash, which Claude Code's Bash tool uses. Without it, Claude Code falls back to its PowerShell tool for shell commands. WSL setups don't need Git for Windows.

## Setting Up Git with Claude Code

### Install Claude Code

Anthropic's recommended install is the native installer, which updates itself in the background:

```
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
```

```
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
```

Homebrew (`brew install --cask claude-code`) and WinGet (`winget install Anthropic.ClaudeCode`) also work but don't auto-update by default. The npm package (`npm install -g @anthropic-ai/claude-code`) is still available and requires Node.js 22 or later.

### Authenticate and Verify Git Integration

Launch Claude Code in your terminal inside any Git repository:

```
cd /path/to/your/project
claude
```

Follow the prompts to authenticate. Once inside, verify Git integration works by typing a natural language request:

```
Show me what files have changed
```

When a conversation starts, Claude Code gives Claude a Git status snapshot of the repository — the current branch, the main branch, `git status` output, and recent commits — so it already has context before you ask anything. No additional Git configuration is required; if `git` is on your PATH, Claude Code will use it.

### What Claude Code Actually Calls

Under the hood, every natural language Git operation maps to a real shell invocation. Claude Code is not reimplementing Git — it runs your local `git` binary. The implications:

- **Your `.gitconfig` is respected.** Custom aliases, signing keys, default branch names, and `user.email` apply to every commit Claude makes
- **Hooks fire normally.** `pre-commit`, `commit-msg`, `pre-push` — Claude's commits go through your installed hooks. A misbehaving hook will block Claude the same way it would block you
- **`safe.directory` matters.** If you work in mounted drives, dev containers, or shared filesystems, Git's safe-directory protection applies to Claude too
- **Permission rules gate risky commands.** You can make Claude ask before every push by adding `"ask": ["Bash(git push *)"]` under `permissions` in `.claude/settings.json`, while still letting it commit locally without prompts

This is also why most Claude won't commit issues turn out to be ordinary Git config problems — a missing `user.email`, a stale GPG key, or a `pre-commit` hook rejecting the staged diff.

If your team already has its own commit and PR conventions packaged as skills, you can remove Claude Code's built-in commit/PR instructions and the Git status snapshot with `"includeGitInstructions": false` (or the `CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS` environment variable for a single session).

## Essential Git Operations with Claude Code

This is where Claude Code shines in day-to-day development. Rather than memorising flags and options, you describe what you want in plain English. Keep our [Git commands reference](https://www.deployhq.com/git/commands) handy if you want to check what Claude is running on your behalf.

### Creating Commits

Claude analyses your staged changes and recent commit history to generate messages that match your project's conventions. A few example prompts:

- **Commit these auth changes** — Claude inspects the diff, identifies it as authentication-related, and writes a descriptive message
- **Create a commit following conventional commits** — Claude formats the message as `feat:`, `fix:`, `refactor:`, etc., based on the actual changes
- **Commit with a detailed body explaining the security implications** — Claude adds a multi-line body explaining why the change was made

If you use [Conventional Commits](https://www.deployhq.com/blog/conventional-commits-a-standardized-approach-to-commit-messages), add a rule to your project's `CLAUDE.md` file and Claude will follow that format for every commit.

### Resolving Merge Conflicts

Instead of manually editing conflict markers, describe the situation:

- **Help me resolve these merge conflicts on the feature branch** — Claude reads the conflicting files, understands both sides, and proposes a resolution
- **Resolve the conflicts in src/auth.ts keeping our version of the login timeout** — Claude applies your preference while integrating non-conflicting changes from the other branch
- **Show me what's conflicting and explain each conflict** — Claude breaks down each conflict with context about what each side changed and why

Claude handles rebase conflicts the same way: if conflicts arise at any step of a rebase, you can ask Claude to resolve them while preserving the intent of both change sets.

### Managing Branches

Branch operations become conversational:

- **Create a feature branch for the new payment integration** — Claude runs `git checkout -b feature/payment-integration` (or your team's naming convention if specified in CLAUDE.md)
- **Which branches have unmerged work?** — Claude lists branches with their last commit dates and descriptions
- **Delete all branches that have been merged into main** — Claude identifies safe-to-delete branches and removes them
- **Switch to the branch that has the auth refactor** — Claude finds the right branch by searching commit messages and branch names

Teams adopting one of the [common Git branching strategies](https://www.deployhq.com/blog/5-effective-git-branching-strategies-for-streamlined-development) (Gitflow, trunk-based, environment branches) should document the convention in `CLAUDE.md` so Claude follows it consistently for every new branch.

Don't confuse Git branches with the `/branch` slash command: `/branch` forks the _conversation_ so you can try a different direction, and has nothing to do with your repository's branches.

### Working with Pull Requests

For GitHub, Claude Code uses the GitHub CLI (`gh`) to create and manage pull requests:

- **Create a PR for this feature branch with a summary of changes** — Claude analyses all commits on the branch, generates a title and description covering the what and why, and opens the PR
- **Update the PR description with the latest changes** — Claude amends the description after additional commits
- **What feedback is on my open PR?** — Claude fetches review comments and summarises them

A few built-in commands help around PRs:

- **`/code-review`** (alias `/review`) reviews the current diff, or a PR number, branch, or path you pass, for correctness bugs
- **`/security-review`** analyses the changes on your current branch against `origin`'s default branch for vulnerabilities such as injection or auth issues
- **`claude --from-pr 1234`** opens the session picker filtered to sessions linked to a specific pull request, so you can pick up review feedback where you left off

For how these compare with dedicated review bots, see our [AI code review tools comparison](https://www.deployhq.com/blog/ai-code-review-tools-compared-coderabbit-copilot-sourcery-ellipsis). For tips on structuring effective PRs, see our guide to [the perfect pull request](https://www.deployhq.com/blog/the-perfect-pull-request-best-practices-for-collaborative-development).

### Searching Git History

Git archaeology is one of Claude Code's strongest capabilities:

- **Find when the login timeout was changed from 30 minutes to 15** — Claude searches through commit diffs to pinpoint the exact commit
- **What commits touched the auth module this week?** — Claude filters history by path and date range
- **Why was the caching layer redesigned in v2.1?** — Claude reads commits, PR descriptions, and code comments to reconstruct the reasoning
- **Who changed the deployment config last and what did they change?** — Claude traces authorship through `git log` and `git blame`
- **What changes made it into the v1.2.3 release?** — Claude compares tags and summarises the changelog

For very large repositories, narrow the search with a path or commit range in your prompt (…in `src/billing/` over the last 30 days) so Claude doesn't burn context grepping the whole tree.

### Rebasing and Cherry-Picking

For more advanced Git workflows:

- **Rebase this branch onto main and squash the WIP commits** — Claude performs the rebase, identifies which commits are work-in-progress, and squashes them into logical units
- **Cherry-pick the database migration fix from the hotfix branch** — Claude identifies the specific commit and applies it to your current branch
- **Clean up my commit history before merging — squash the fixup commits** — Claude rewrites the branch history, combining related commits

### Checkpoints Are Not a Substitute for Git

Claude Code's `/rewind` (aliases `/checkpoint`, `/undo`) can roll back the conversation and the files Claude edited with its own file tools. It does **not** track files that only a Bash command changed, and it isn't permanent history. Anthropic's own docs describe checkpoints as session-level recovery that works alongside Git rather than replacing it — commit early and often, and use `/rewind` for quick undo that last attempt moments.

## Advanced Git Workflows

### Git Worktrees with Claude Code

Git worktrees let you check out multiple branches simultaneously in separate directories. Claude Code has first-class worktree support:

```
claude --worktree feature-auth # or: claude -w feature-auth
```

This creates an isolated checkout under `.claude/worktrees/feature-auth/` on a new branch named `worktree-feature-auth` and starts Claude inside it. Run the same command with a different name in a second terminal and you have two sessions editing the same repository without colliding. You can also ask Claude mid-session to work in a worktree and it will create one for you.

Three practical gotchas from the docs:

- **Add `.claude/worktrees/` to `.gitignore`** so worktree contents don't show up as untracked files in your main checkout
- **A worktree is a fresh checkout** — gitignored files like `.env` aren't there and dependencies aren't installed. List the gitignored files you need copied in a `.worktreeinclude` file at the repo root
- **Clean up `-p` runs yourself.** A `claude -p --worktree` run exits without asking, so remove leftovers with `git worktree remove <path>`

Worktrees also pair well with [running Claude Code headless in CI and in parallel](https://www.deployhq.com/blog/running-ai-coding-agents-cicd-headless-mode-claude-code-codex-gemini) — one session per worktree — so a long-running task in one branch doesn't block a hotfix in another.

### GitHub Actions Integration

Claude Code can help you write, debug, and optimise CI workflows, and it can also run _inside_ them:

- **Run `/install-github-app`** in your repository to install the Claude GitHub App, add the authentication secret, and open a PR with the workflow file. After you merge it, mentioning `@claude` in an issue or PR comment triggers Claude in your Actions runner. This command works only with github.com repositories; GitLab has its own CI/CD integration
- **Create a GitHub Actions workflow that runs tests on push** — Claude generates a `.github/workflows/*.yml` with proper job dependencies
- **Why is the CI pipeline failing?** — Claude reads the workflow file alongside recent error logs to diagnose issues

GitHub Actions is good at running tests and builds; shipping files to your own servers with release tracking and rollbacks is a different job. If you are weighing whether to deploy straight from Actions, our [DeployHQ vs GitHub Actions comparison](https://www.deployhq.com/compare/deployhq-vs-github-actions) breaks down where each fits, and our walkthrough of [AI agents in CI/CD pipelines, from GitHub issue to production deploy](https://www.deployhq.com/blog/ai-agents-cicd-pipelines-github-issue-to-production-deploy) shows the end-to-end flow.

## Understanding Co-Authored-By Attribution

When Claude Code creates a commit on your behalf, it adds a [Git trailer](https://git-scm.com/docs/git-interpret-trailers) to the commit message by default. In current versions the trailer names the model that made the commit:

```
fix: resolve authentication bug in login flow

Fixes the issue where users were being logged out unexpectedly
after session timeout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
```

The exact name follows the model in use (or the subagent's model, if a subagent made the commit). If Claude Code can't confirm the exact model version it writes plain `Claude`, and for a non-Claude model behind a custom `ANTHROPIC_BASE_URL` it writes `Claude Code`. Pull requests Claude opens get a separate plain-text line in the description: `Generated with [Claude Code](https://claude.com/claude-code)`, prefixed with a robot emoji.

Sessions started in the cloud or via Remote Control add one more thing: a `Claude-Session` trailer on commits (and a link in PR descriptions) pointing back to the claude.ai session.

GitHub recognises the `Co-authored-by:` trailer format and lists co-authors on the commit. Note that GitHub only credits a co-author when the trailer's email is associated with a GitHub account.

### The Case for Keeping Attribution

**Transparency and accountability.** Many organisations value knowing how their code was written. The attribution creates a clear audit trail — and because the trailer now names the model, you can see _which_ model produced a change when you look back at an incident.

**Quality signals for maintainers.** Open source maintainers find disclosure helpful — knowing AI was involved helps them assess how much scrutiny to give a PR and whether they are coaching a human contributor or reviewing AI-generated output.

**Compliance.** Some regulated industries require disclosure of AI tool usage. The European Union's AI Act includes transparency provisions around AI systems.

### The Case for Disabling Attribution

**Commit message standards.** Strict commit conventions may not accommodate attribution lines, and the extra text can conflict with tooling that parses commit messages (Conventional Commits validators, changelog generators, semantic-release).

**Tool vs. collaborator philosophy.** Some developers view AI as a tool (like an IDE or linter), not a co-author. The human who directs, reviews, and approves the code is the true author.

**Clean history.** For some projects, keeping the commit history focused purely on code changes is a priority.

**DCO sign-off policies.** In projects that use `git commit --signoff` and the Developer Certificate of Origin, the `Signed-off-by:` line is a human's certification that they have the right to submit the change. Decide as a team whether an AI co-author trailer belongs next to it, and configure Claude Code accordingly.

### How to Configure Attribution

Attribution is controlled by the `attribution` setting. Settings files live at:

- **User (all projects):** `~/.claude/settings.json` — on Windows, that is `%USERPROFILE%\.claude\settings.json`
- **Shared project:** `.claude/settings.json` — commit it so the whole team gets the same behaviour
- **Personal, one project:** `.claude/settings.local.json` — Claude Code adds it to `.gitignore` when it creates the file; if you create it by hand, add it yourself

To **remove all attribution** (commit trailer, PR line, and session link):

```
{
  "attribution": false
}
```

The `false` shorthand requires Claude Code v2.1.281 or later; older versions reject it and skip the whole settings file. If teammates may be on older versions, use the long form instead:

```
{
  "attribution": {
    "commit": "",
    "pr": ""
  }
}
```

To **change** the text rather than remove it, set your own string. This example keeps a commit trailer with your own wording and drops the PR line:

```
{
  "attribution": {
    "commit": "Co-Authored-By: AI assistant <ai@example.com>",
    "pr": ""
  }
}
```

**What each key controls:**

- **`attribution.commit`** : the text (including any trailers) added to commit messages. Empty string hides it
- **`attribution.pr`** : the line added to pull request descriptions. Empty string hides it
- **`attribution.sessionUrl`** : whether cloud and Remote Control sessions append the claude.ai session link (`true` by default)

**What about `includeCoAuthoredBy`?** It is deprecated (since v2.0.62) in favour of `attribution`. Claude Code still honours `"includeCoAuthoredBy": false` in older settings files — it hides both the commit trailer and the PR line — but ignores it once you set `attribution.commit` or `attribution.pr`. There is no `gitAttribution` setting; if you copied one from an older guide, you can delete it.

### Project-Level and Organisation-Level Control

Because `attribution` can be set in any settings file, different projects can behave differently — your open source contributions can keep attribution while your internal projects drop it. Commit `.claude/settings.json` so everyone who clones the repository gets the same behaviour.

Organisations that need a single policy can set `attribution` in managed settings, which individual developers can't override. Run `/status` inside Claude Code to see which settings files are active.

### Using CLAUDE.md for Additional Control

You can also include Git commit instructions in your project's CLAUDE.md file (an [AI coding config file](https://www.deployhq.com/blog/ai-coding-config-files-guide)):

```
## Git Commit Guidelines

When creating commits:
- Follow conventional commit format
- Keep the first line under 50 characters
- Do not include AI attribution in commit messages
```

This works more reliably than you might expect: Claude Code tells Claude that your own attribution instructions in CLAUDE.md or memory take precedence over the configured commit and PR lines — unless those lines are set in managed settings. If you need the rule enforced rather than requested, use the setting (or a `commit-msg` hook) instead of relying on CLAUDE.md alone.

### How Other AI Coding Tools Handle Attribution

There is no industry standard for AI attribution in Git history, and defaults change between releases. Two tools document their behaviour clearly:

| Tool | Default behaviour | How to change it |
| --- | --- | --- |
| Claude Code | `Co-Authored-By: <model name> <noreply@anthropic.com>` trailer on commits; Generated with Claude Code line on PRs | `attribution` setting (`false`, or custom `commit` / `pr` strings) |
| [Aider](https://www.deployhq.com/guides/aider) | Adds a `Co-authored-by` trailer to commit messages (default since v0.85.0); the `(aider)` name suffix applies only when `--attribute-author` or `--attribute-committer` are set explicitly | Aider's `--attribute-co-authored-by`, `--attribute-author` and `--attribute-committer` options; check `aider --help` for your version |

Editor-based tools such as [Cursor](https://www.deployhq.com/guides/cursor) and [GitHub Copilot](https://www.deployhq.com/guides/github-copilot) take their own approaches, especially for their background or cloud agents — check each tool's current documentation before you standardise. If your team mixes tools (Cursor for editor work, Claude Code for terminal work, Aider for batch refactors), pick one convention and enforce it with a `commit-msg` hook so the history stays consistent regardless of which tool a developer used. For a broader feature comparison, see [Claude Code vs Codex CLI vs Gemini CLI](https://www.deployhq.com/blog/comparing-claude-code-openai-codex-and-google-gemini-cli-which-ai-coding-assistant-is-right-for-your-deployment-workflow).

## Control Deployments from Claude's Commit Messages

Because Claude writes your commit messages, it can also write the instructions your deployment tool reads from them. [DeployHQ](https://www.deployhq.com) supports [commit message deployment commands](https://www.deployhq.com/support/deployments/automatic-deployments/commit-message-deployment-commands) — square-bracket commands, anywhere in the message, case-insensitive — that change how an automatic deployment runs:

- `[skip_build]` — deploy without running your build pipeline commands
- `[skip_cache]` — run the build without reusing the previous build cache
- `[from_scratch]` — deploy every file, not just the changes since the last deployment
- `[config_only]` — deploy only your configuration files
- `[deploy: staging]` — deploy to a named server or server group, even if it doesn't auto-deploy (the server must have the **Commit command** toggle enabled, so a commit message can never deploy somewhere you haven't allowed)

That lets you ask, in plain English, _commit the copy fix and skip the build_ and get `fix: correct pricing page typo [skip_build]`. Add the commands to your CLAUDE.md so Claude knows when to use them:

```
## Deployment commands in commits
- Docs-only or copy-only changes: append [skip_build]
- After changing package-lock.json or composer.lock: append [skip_cache]
- Never add [deploy: ...] unless I explicitly ask for a deploy to a named server
```

One gotcha: **don't put a deployment command in `attribution.commit`**. That text is added to every commit Claude makes, so `[deploy: production]` there would trigger a production deploy on every push (for servers with the Commit command toggle on).

Ready to wire this up? [Start a free](https://www.deployhq.com/signup)[DeployHQ](https://www.deployhq.com) trial and connect your repository — Claude's next push can be your first automated deployment.

## Deploying Git Changes with DeployHQ

Once Claude Code has committed and pushed your changes, the next step is getting that code onto your servers. [DeployHQ](https://www.deployhq.com) connects directly to your Git repository and deploys automatically — creating a seamless workflow from AI-assisted development to production.

The typical flow looks like this:

```
flowchart LR
    A[Claude Code commits & pushes] --> B[GitHub/GitLab receives push]
    B --> C[DeployHQ webhook triggers]
    C --> D[Build pipeline runs]
    D --> E[Code deployed to server]
```

When you [deploy from GitHub](https://www.deployhq.com/deploy-from-github) (or [deploy from GitLab](https://www.deployhq.com/deploy-from-gitlab)) through [DeployHQ](https://www.deployhq.com), every push to your main branch can trigger an [automatic deployment from Git](https://www.deployhq.com/features/automatic-deployments). Combined with [build pipeline integration](https://www.deployhq.com/features/build-pipelines) for asset compilation, testing, and other pre-deployment steps, you get a complete CI/CD workflow without leaving your terminal. If you want Claude to trigger and monitor deployments directly, see how to [deploy from your terminal with DeployHQ's agent tooling](https://www.deployhq.com/agents) and our guide to [driving](https://www.deployhq.com/blog/drive-deployhq-from-cursor-claude-code-windsurf-ai-editor-deploys)[DeployHQ](https://www.deployhq.com) from Claude Code, Cursor, and Windsurf.

If something goes wrong after deploy, [one-click rollback](https://www.deployhq.com/features/one-click-rollback) restores the previous release without you having to revert commits on the main branch first — useful when Claude's PR turned out to have a subtle bug that only surfaced in production.

Claude Code handles the Git side (commits, branches, PRs), and [DeployHQ](https://www.deployhq.com) handles the deployment side (builds, transfers, rollbacks). Together, they eliminate manual steps between writing code and shipping it.

## Best Practices for Git Workflows with Claude Code

**Review Claude's commits before pushing.** Always inspect the commit messages and diffs Claude generates — you are ultimately responsible for the code that goes into your repository. Run `/diff` inside Claude Code to review the working tree, or `git log --oneline -5` and `git diff HEAD~1` before pushing.

**Configure CLAUDE.md with your Git conventions.** Specify your branch naming convention, commit message format, protected branches, and any project-specific rules. Claude reads this file at the start of every session.

**Make smaller, focused commits.** Smaller commits let Claude generate more precise commit messages and make your history easier to bisect when debugging.

**Use descriptive branch names.** Names that indicate the purpose of changes help Claude understand context when creating PRs or analysing branches.

**Specify commit conventions explicitly.** If you use Conventional Commits or another standard, tell Claude to follow it. This improves the readability and structure of your project history.

**Leverage Claude for git archaeology.** Use it to answer questions about past changes, understand why decisions were made, or find when bugs were introduced.

**Use /compact in long sessions.** In repos with extensive history or many files, `/compact` summarises the conversation so far to free up context without losing track of the task.

**Protect `main` from direct pushes.** Even with Claude reviewing diffs, route everything through a PR. Branch protection rules in GitHub/GitLab catch the case where Claude (or you) accidentally pushes to `main` instead of a feature branch. Pair this with an `ask` permission rule on `git push` so Claude always checks with you first.

## Frequently Asked Questions

### Does Claude Code need Git installed?

No — Git is optional for Claude Code itself, but you need it for every workflow in this guide (commits, branches, PRs, worktrees). On native Windows, Git for Windows is recommended because it provides Git Bash for Claude's Bash tool; without it, Claude Code uses PowerShell instead.

### How do I disable the Co-Authored-By attribution?

Add `"attribution": false` to `~/.claude/settings.json` (Claude Code v2.1.281+), or for older versions set `"attribution": {"commit": "", "pr": ""}`. For project-specific control, put the same setting in `.claude/settings.json` in your repo root. The older `"includeCoAuthoredBy": false` still works but is deprecated.

### Can I customise what the attribution message says?

Yes. Set `attribution.commit` to any string — including your own trailers — and `attribution.pr` to the text you want in pull request descriptions. An empty string hides either one.

### Why does my commit say Claude Sonnet 5 or Claude Opus instead of just Claude?

Current versions of Claude Code name the model that made the commit in the `Co-Authored-By` trailer. It falls back to plain `Claude` when it can't confirm the exact model version.

### Can Claude Code commit and push to GitHub?

Yes. Claude commits locally with your Git identity and pushes with whatever credentials your `git` already uses. Pushing is a shell command, so it goes through Claude Code's permission prompts unless you have allowed it — add an `ask` rule for `Bash(git push *)` if you want a confirmation every time.

### Can Claude Code resolve merge conflicts?

Yes. Claude reads both sides of a conflict, understands the intent behind each change, and proposes a resolution. You can guide it with preferences like keep our version of the timeout value or combine both implementations. It works for both merge and rebase conflicts.

### Does Claude Code work with GitHub, GitLab, and Bitbucket?

Claude Code works with any Git hosting provider because it drives Git directly through the command line. For GitHub pull requests it uses the `gh` CLI; with GitLab or Bitbucket you can ask it to use those providers' CLIs in the same way. `/install-github-app` is github.com-only.

### How does Claude Code handle large repositories?

Claude Code reads files on demand rather than loading the whole repository. Scope your prompts to specific directories or commit ranges, use `/compact` in long sessions, and consider worktrees with sparse checkouts (`worktree.sparsePaths`) for monorepos.

### Can Claude Code create pull requests?

Yes. Ask Claude to create a PR for this branch and it will analyse the commit history, generate a descriptive title and body, and open the PR using the GitHub CLI. It can also update PR descriptions and summarise review feedback.

### Does the Co-Authored-By line affect GitHub contribution graphs?

Adding a co-author doesn't remove anything from you: the commit's author is still you. GitHub only credits a co-author when the trailer's email is associated with a GitHub account.

* * *

Ready to automate your deployment workflow? [Compare](https://www.deployhq.com/pricing)[DeployHQ](https://www.deployhq.com) plans and connect your Git repository to deploy code to your servers automatically — every time you push.

For questions or support, reach out at [support@deployhq.com](mailto:support@deployhq.com) or find us on [Twitter/X @deployhq](https://x.com/deployhq).

