> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Git Integration

Cloud Code includes full Git support, allowing you to use Git for version control of your project content.

## Configure Git User Information

You need to configure your user information the first time you use it:

<Steps>
  <Step title="Open Settings">
    Go to **Settings > Git**
  </Step>

  <Step title="Fill in Information">
    Enter your username and email
  </Step>

  <Step title="Save">
    Click the save button
  </Step>
</Steps>

```
Username: Your Name
Email: your.email@example.com
```

<Info>
  This information is used for Git commit records. We recommend using the same email address as your GitHub account.
</Info>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/jiekou/en/docs/cc/assets/cc-git-config-user.png" alt="Git user information configuration" />
</Frame>

## Connect a Remote Repository

### Configure GitHub Credentials

<Steps>
  <Step title="Open Git Settings">
    Go to **Settings > Git**
  </Step>

  <Step title="Add Credentials">
    In the “Git Credentials” section, click the **+ Add** button
  </Step>

  <Step title="Enter Username">
    Enter your GitHub Username
  </Step>

  <Step title="Enter Token">
    Enter your GitHub Personal Access Token (click the **Create Tokens** button in the upper-right corner of the input field and follow the prompts to create one)
  </Step>

  <Step title="Click Save">
    Click the **Save Credentials** button
  </Step>
</Steps>

If the configuration is successful, you will see your credential information displayed in the “Git Credentials” section, marked as “Active”.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/jiekou/en/docs/cc/assets/cc-git-credentials.png" alt="Git credentials configuration" />
</Frame>

## Initialize a Git Repository

<Steps>
  <Step title="Open the Git Panel">
    Click the **Source Control** tab in the top tab bar
  </Step>

  <Step title="Create a Repository">
    Create a new empty repository on GitHub
  </Step>

  <Step title="Initialize">
    Enter the remote repository URL and click the **Bind** button to complete Git repository initialization
  </Step>
</Steps>

After initialization succeeds, you will see the following interface displayed on the “Source Control” page:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/jiekou/en/docs/cc/assets/cc-git-bind-succ.png" alt="Git repository list" />
</Frame>

## Commit Changes

<Steps>
  <Step title="Stage Files">
    Click the **+** button next to a file to stage a single file, or click **Stage All** to stage all changes
  </Step>

  <Step title="Write a Commit Message">
    Describe your changes in the commit message input field
  </Step>

  <Step title="Commit">
    Click the **Commit** button to commit your changes to the local repository
  </Step>

  <Step title="Publish">
    Click the **Publish** button to publish your changes to the remote repository
  </Step>
</Steps>

## View History

You can view the commit history in the Git panel:

* **Commit List** — Displays all commit records
* **Commit Details** — Click a commit to view the changed files
* **File Diff** — View specific code changes

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/jiekou/en/docs/cc/assets/cc-git-repo-history.png" alt="Git repository commit history" />
</Frame>

## Operate Git with Claude Code

You can ask Claude Code to help you perform Git operations:

| Request                             | Claude Code Action              |
| ----------------------------------- | ------------------------------- |
| "Commit these changes"              | Stage files and create a commit |
| "Push to GitHub"                    | Run git push                    |
| "Create a new branch feature/login" | Create and switch to the branch |
| "View commit history"               | Display git log                 |
| "Roll back to the previous commit"  | Run git reset                   |

## Related Documentation

<Columns cols={2}>
  <Card title="Project Management" icon="folder" href="/en/docs/cc/project">
    Manage project information
  </Card>

  <Card title="Chat Mode" icon="message-bot" href="/en/docs/cc/chat-mode">
    In Chat Mode, you can ask Claude Code to help you complete tasks through a dialog box.
  </Card>
</Columns>
