Linux command
git-info 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show repository info
git info
Show repository info with colored titles
git info --color
Show repository info without configuration details
git info --no-config
说明
git info displays comprehensive repository information in a single formatted view, including remote URLs, remote branches, local branches, submodules (if any), most recent commit, and configuration settings. Part of the git-extras suite, this command gives a snapshot of the current repository state without needing to run multiple separate git commands. The output format for the most recent commit and configuration info can be customized via `git config --global --add git-extras.info.log "<log-command>"` and `git config --global --add git-extras.info.config-grep "<config-grep-command>"`.
参数
- -c, --color
- Use color for information titles.
- --no-config
- Do not display configuration info section.
- --help
- Display help information.
FAQ
What is the git-info command used for?
git info displays comprehensive repository information in a single formatted view, including remote URLs, remote branches, local branches, submodules (if any), most recent commit, and configuration settings. Part of the git-extras suite, this command gives a snapshot of the current repository state without needing to run multiple separate git commands. The output format for the most recent commit and configuration info can be customized via `git config --global --add git-extras.info.log "<log-command>"` and `git config --global --add git-extras.info.config-grep "<config-grep-command>"`.
How do I run a basic git-info example?
Run `git info` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c, --color do in git-info?
Use color for information titles.