Linux command
lazygit 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Open lazygit
lazygit
Open in specific repository
lazygit -p [/path/to/repo]
Open with specific work tree
lazygit -w [/path/to/worktree]
Open log file
lazygit -d
Print default config
lazygit -c
Check version
lazygit -v
说明
lazygit is a terminal user interface (TUI) for Git that replaces sequences of typed commands with visual, keyboard-driven panels. Its split-pane layout presents Status, Files, Branches, Commits, and Stash side by side, letting you stage individual files or hunks with a single keypress, review diffs inline, and commit without leaving the interface. Beyond everyday staging and committing, lazygit makes Git's more advanced operations approachable. Interactive rebasing is handled through a visual commit list where entries can be reordered, squashed, or edited in place. Cherry-picking is a matter of tagging commits and pasting them onto another branch. Merge conflict resolution displays conflicting sections with one-key choices for each side. Branch management, remote operations (push, pull, fetch), and stash manipulation are all accessible from their respective panels with contextual menus that surface the available actions. A customizable configuration file allows user-defined keybindings and custom command shortcuts.
参数
- -p _path_, --path _path_
- Repository path to open.
- -f _path_, --filter _path_
- Filter files by path in status panel.
- -g _path_, --git-dir _path_
- Custom git directory.
- -w _path_, --work-tree _path_
- Custom work tree.
- -c, --config
- Print default config.
- -d, --debug
- Run with debug logging.
- -v, --version
- Print version.
FAQ
What is the lazygit command used for?
lazygit is a terminal user interface (TUI) for Git that replaces sequences of typed commands with visual, keyboard-driven panels. Its split-pane layout presents Status, Files, Branches, Commits, and Stash side by side, letting you stage individual files or hunks with a single keypress, review diffs inline, and commit without leaving the interface. Beyond everyday staging and committing, lazygit makes Git's more advanced operations approachable. Interactive rebasing is handled through a visual commit list where entries can be reordered, squashed, or edited in place. Cherry-picking is a matter of tagging commits and pasting them onto another branch. Merge conflict resolution displays conflicting sections with one-key choices for each side. Branch management, remote operations (push, pull, fetch), and stash manipulation are all accessible from their respective panels with contextual menus that surface the available actions. A customizable configuration file allows user-defined keybindings and custom command shortcuts.
How do I run a basic lazygit example?
Run `lazygit` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -p _path_, --path _path_ do in lazygit?
Repository path to open.