Home Explore Blog CI



zed

3rd chunk of `docs/src/git.md`
f580149d84e3fbcbf68181c03a92492b29b222b02e77258b0000000100000d2f
You can ask AI to generate a commit message by focusing on the message editor within the Git Panel and either clicking on the pencil icon in the bottom left, or reaching for the {#action git::GenerateCommitMessage} ({#kb git::GenerateCommitMessage}) keybinding.

> Note that you need to have an LLM provider configured. Visit [the AI configuration page](./ai/configuration.md) to learn how to do so.

<!-- Add media -->

More advanced AI integration with Git features may come in the future.

## Git Integrations

Zed integrates with popular Git hosting services to ensure that Git commit hashes and references to Issues, Pull Requests, and Merge Requests become clickable links.

Zed currently supports links to the hosted versions of
[GitHub](https://github.com),
[GitLab](https://gitlab.com),
[Bitbucket](https://bitbucket.org),
[SourceHut](https://sr.ht) and
[Codeberg](https://codeberg.org).

Zed also has a Copy Permalink feature to create a permanent link to a code snippet on your Git hosting service.
These links are useful for sharing a specific line or range of lines in a file at a specific commit.
Trigger this action via the [Command Palette](./getting-started.md#command-palette) (search for `permalink`),
by creating a [custom key bindings](key-bindings.md#custom-key-bindings) to the
`editor::CopyPermalinkToLine` or `editor::OpenPermalinkToLine` actions
or by simply right clicking and selecting `Copy Permalink` with line(s) selected in your editor.

## Action Reference

| Action                                 | Keybinding                         |
| -------------------------------------- | ---------------------------------- |
| {#action git::Add}                     | {#kb git::Add}                     |
| {#action git::StageAll}                | {#kb git::StageAll}                |
| {#action git::UnstageAll}              | {#kb git::UnstageAll}              |
| {#action git::ToggleStaged}            | {#kb git::ToggleStaged}            |
| {#action git::StageAndNext}            | {#kb git::StageAndNext}            |
| {#action git::UnstageAndNext}          | {#kb git::UnstageAndNext}          |
| {#action git::Commit}                  | {#kb git::Commit}                  |
| {#action git::ExpandCommitEditor}      | {#kb git::ExpandCommitEditor}      |
| {#action git::Push}                    | {#kb git::Push}                    |
| {#action git::ForcePush}               | {#kb git::ForcePush}               |
| {#action git::Pull}                    | {#kb git::Pull}                    |
| {#action git::Fetch}                   | {#kb git::Fetch}                   |
| {#action git::Diff}                    | {#kb git::Diff}                    |
| {#action git::Restore}                 | {#kb git::Restore}                 |
| {#action git::RestoreFile}             | {#kb git::RestoreFile}             |
| {#action git::Branch}                  | {#kb git::Branch}                  |
| {#action git::Switch}                  | {#kb git::Switch}                  |
| {#action git::CheckoutBranch}          | {#kb git::CheckoutBranch}          |
| {#action git::Blame}                   | {#kb git::Blame}                   |
| {#action editor::ToggleGitBlameInline} | {#kb editor::ToggleGitBlameInline} |

> Not all actions have default keybindings, but can be bound by [customizing your keymap](./key-bindings.md#user-keymaps).

Title: AI Commit Messages, Git Integrations, and Action Reference in Zed
Summary
This section covers AI-powered commit message generation within Zed's Git Panel, integration with Git hosting services like GitHub and GitLab for clickable links to commits and issues, and the 'Copy Permalink' feature for sharing specific code snippets. It also provides a table summarizing Git-related actions available in Zed and their default keybindings, noting that custom keybindings can be set for actions without defaults.