LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-local-commits

List unpushed local commits

TLDR

Show local commits not pushed
$ git local-commits
copy
Show local commits with a graph
$ git local-commits --graph
copy

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
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

Requires the current branch to have an upstream set; otherwise Git reports an error about there being no upstream configured.

SEE ALSO

RESOURCES

Copied to clipboard
Kai