Overview
Zed provides deep Git integration built on libgit2 and custom Git command execution, offering both visual feedback and powerful Git operations directly within the editor.Git Status
Zed continuously tracks Git status and displays changes in the editor.Visual Indicators
- Gutter indicators - Shows modified, added, and deleted lines
- File tree colors - Modified files highlighted in project panel
- Git blame - Inline blame information
Diff Viewing
Diff Hunks
View and interact with Git diff hunks directly in the editor.Cmd+'- Toggle selected diff hunksCmd+"- Expand all diff hunks
Applying Changes
Git Blame
View authorship and commit information for each line.Cmd+K Cmd+B- Show blame hoverCmd+Alt+G B- Toggle inline git blame
Blame Data Structure
Branch Management
Cmd+Ctrl+B- Open recent branches
Branch Operations
- Create new branches
- Switch between branches
- View branch history
- Track upstream status
Git Worktrees
Zed supports Git worktrees for working on multiple branches simultaneously.Worktree Configuration
Configure where worktrees are created:Git Graph
View commit history and branch structure visually.Staging and Committing
Stage Changes
Cmd+Y- Stage and move to next hunkCmd+Shift+Y- Unstage and move to next hunkCmd+Alt+Y- Toggle staged
Restore Changes
Cmd+Alt+Z- Restore file (discard changes)
Git Panel
View and manage Git changes in a dedicated panel. Keybindings:Ctrl+Shift+G- Toggle Git panel focus
Panel Features
- View all modified files
- Stage/unstage changes
- Review diffs
- Commit changes
- Manage branches
Git Actions in Editor
Modified Files
Cmd+Alt+G M- Open modified files
Review Mode
Cmd+Alt+G R- Review diff
Diff Review Comments
Zed supports code review with diff comments.Repository Operations
Commit Parsing
Commit Data Reader
Git Stash
- Create stashes
- Apply stashes
- Drop stashes
- List stashes
Related Features
Editing
Code editing with diff integration
Navigation
Navigate through code and changes
