docs: Add Zed as Git Editor example (#34572)

Release Notes:

- N/A
This commit is contained in:
Peter Tripp 2025-07-16 15:57:02 -04:00 committed by GitHub
parent 0bde929d54
commit 0023773c68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,3 +151,17 @@ When viewing files with changes, Zed displays diff hunks that can be expanded or
| {#action editor::ToggleSelectedDiffHunks} | {#kb editor::ToggleSelectedDiffHunks} |
> Not all actions have default keybindings, but can be bound by [customizing your keymap](./key-bindings.md#user-keymaps).
## Git CLI Configuration
If you would like to also use Zed for your [git commit message editor](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_editor) when committing from the command line you can use `zed --wait`:
```sh
git config --global core.editor "zed --wait"
```
Or add the following to your shell environment (in `~/.zshrc`, `~/.bashrc`, etc):
```sh
export GIT_EDITOR="zed --wait"
```