Linux command
git-missing 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show commits in current branch missing from another branch and vice versa
git missing [branch]
Compare two specific branches
git missing [branch1] [branch2]
说明
git missing shows commits that exist in one branch but not the other. This git-extras command performs a symmetric comparison, revealing what changes are unique to each branch. If only one branch is specified, it is compared against the current branch. If no branches are specified, the current branch is compared against the default branch (usually master or main). The command is particularly useful before merging, as it clearly shows what commits will be introduced from each side. It essentially performs `git log --left-right --oneline branch1...branch2` to provide a bidirectional view of branch divergence.
FAQ
What is the git-missing command used for?
git missing shows commits that exist in one branch but not the other. This git-extras command performs a symmetric comparison, revealing what changes are unique to each branch. If only one branch is specified, it is compared against the current branch. If no branches are specified, the current branch is compared against the default branch (usually master or main). The command is particularly useful before merging, as it clearly shows what commits will be introduced from each side. It essentially performs `git log --left-right --oneline branch1...branch2` to provide a bidirectional view of branch divergence.
How do I run a basic git-missing example?
Run `git missing [branch]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more git-missing examples?
This page includes 2 examples for git-missing, plus related commands for nearby Linux tasks.