From 0023773c68d8c065cfd99d2a6dad3f8c23bf856c Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Wed, 16 Jul 2025 15:57:02 -0400 Subject: [PATCH] docs: Add Zed as Git Editor example (#34572) Release Notes: - N/A --- docs/src/git.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/src/git.md b/docs/src/git.md index 642861c7b0..76db15a767 100644 --- a/docs/src/git.md +++ b/docs/src/git.md @@ -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" +```