The git missing command is a feature provided by the “git-extras” extension. It allows you to identify commits that exist in one branch but not in another. This can be useful for tracking down commits that have not been merged or shared between branches.
To use the git missing command, you need to have the “git-extras” extension installed. Once installed, you can run the following command:
# git missing [branch1] [branch2]
In this command, [branch1] and [branch2] represent the two branches you want to compare. The command will analyze the commit history of both branches and display a list of commits that exist in
The output of the git missing command will typically show the commit hashes or other identifying information of the missing commits. This can help you identify the specific changes that have not been incorporated into one of the branches.
The git missing command is particularly useful when you want to verify whether all the changes from one branch have been merged into another branch. It helps to ensure that no commits are accidentally left behind or forgotten during the merging process.
It’s important to note that “git-extras” is an independent extension and not part of the official Git distribution. Therefore, you’ll need to install “git-extras” separately if you want to use the git missing command or any other commands provided by the extension.
For more detailed information about the git missing command and other commands provided by “git-extras,” you can refer to the official documentation on the GitHub repository you mentioned: https://github.com/tj/git-extras/blob/master/Commands.md#git-missing.
Always consult the documentation specific to your version of “git-extras” to ensure accurate usage and compatibility.
git missing Command Examples
1. Show commits which aren’t shared between the currently checked-out branch and another branch:
# git missing branch
2. Show commits which aren’t shared between two branches:
# git missing branch_1 branch_2