git-local-commits
List unpushed local commits
TLDR
Show local commits not pushed
$ git local-commits
Show local commits with a graph$ git local-commits --graph
SYNOPSIS
git local-commits [git-log-options]
DESCRIPTION
git local-commits, a git-extras command, lists commits on the current branch that haven't been pushed to its upstream tracking branch. It runs `git log @{upstream}..@`, so it requires HEAD to be tracking a remote branch. Any extra arguments are forwarded directly to `git log`, so flags like `--graph` or `--stat` work as expected.This provides a quick way to see what changes will be pushed before actually pushing them.
PARAMETERS
GIT-LOG-OPTIONS
Any options accepted by git log; passed through unchanged.
INSTALL
sudo apt install git
sudo dnf install git
sudo pacman -S git
sudo apk add git
sudo zypper install git
brew install git
nix profile install nixpkgs#git
CAVEATS
Requires the current branch to have an upstream set; otherwise Git reports an error about there being no upstream configured.
SEE ALSO
git-log(1), git-extras(1)