1# Git
2
3Zed currently offers a set of fundamental Git features, with support for more advanced ones—like conflict resolution tools, line by line staging, and more—coming in the future.
4
5Here's an overview of all currently supported features:
6
7- Committing
8- Staging, pushing, pulling, and fetching
9- Changeset diff view
10- Diff indicators in buffers and editor scrollbars
11- Inline diff toggle and reverts in the editor for unstaged changes
12- Git status in the project panel
13- Branch creating and switching
14- Git blame viewing
15
16## Git Panel
17
18The Git Panel gives you a birds-eye view of the state of your working tree and of Git's staging area.
19You can see at a glance which files have changed, and which are staged for commit.
20Zed monitors your repository so that changes you make on the command line are instantly reflected.
21
22<!-- Add media and keybinding -->
23
24### Fetch, push, and pull
25
26You can fetch, push, or pull from your Git repository in Zed via the buttons available on the Git Panel or via the Command Palette by looking at the respective actions: `git fetch`, `git push`, and `git pull`.
27
28## Diff View
29
30You can see all of the changes captured by Git in Zed by opening the Diff View, accessible via the `git: diff` action in the Command Palette or the Git Panel.
31
32All of the changes displayed in the Diff View behave exactly the same as any other multibuffer: they are all editable excerpts of files.
33
34You can stage or unstage each hunk as well as a whole file by hitting the buttons on the tab bar or their corresponding keybindings.
35
36<!-- Add media and keybinding -->
37
38## Git with AI
39
40Zed currently supports LLM-powered commit message generation. This can be done when focused on the commit message editor in the Git Panel.
41
42> Note that you need to have an LLM provider configured.
43
44<!-- Add media and keybinding -->
45
46More advanced AI integration with Git features may come in the future.
47
48<!--
49## Git Hunk Navigation
50
51TBD: Explain Git Hunks
52
53- Navigating hunks
54- Expanding hunks
55- Reverting hunks
56-->
57
58## Git Integrations
59
60Zed integrates with popular Git hosting services to ensure that Git commit hashes and references to Issues / Pull Requests / Merge Requests become clickable links.
61
62Zed currently support links to the hosted versions of
63[GitHub](https://github.com),
64[GitLab](https://gitlab.com),
65[Bitbucket](https://bitbucket.org),
66[SourceHut](https://sr.ht) and
67[Codeberg](https://codeberg.org).
68
69Zed also has a Copy Permalink feature to create a permanent link to a code snippet on your Git hosting service.
70These links are useful for sharing a specific line or range of lines in a file at a specific commit.
71Trigger this action via the [Command Palette](./getting-started.md#command-palette) (search for `permalink`),
72by creating a [custom key bindings](key-bindings.md#custom-key-bindings) to the
73`editor::CopyPermalinkToLine` or `editor::OpenPermalinkToLine` actions
74or by simply right clicking and selecting `Copy Permalink` with line(s) selected in your editor.