What command lists all commits in the current branch that are not in the upstream branch?
Posted by HenryPk
Last Updated: June 29, 2024
To list all commits in the current branch that are not in the upstream branch, you can use the following Git command:
git log @{u}..HEAD
Here's what this command does: - @{u} refers to the upstream branch of the current branch. - ..HEAD specifies that you want to see commits that are on the HEAD (the current branch) but not in the upstream branch. If you want a more concise summary of the commits, you can use the --oneline flag:
git log --oneline @{u}..HEAD
This will display a simple list of the commits that are unique to your current branch.
Related Content