A CLI tool to check if HEAD is pushed to remote.
Tip
Depending on your needs, running git branch -r --contains HEAD
and checking if the output contains the remote branch or tag may be enough.
cargo install git-push-check
Run git-push-check
in a git repository to check if the current HEAD is pushed to the remote.
Tip
You may want to git fetch
before running git-push-check
.
Options:
--only
: Which remote references to check: branches, tags, or all (default: all)-h
,--help
: Print help-V
,--version
: Print version
Exit codes:
0
: HEAD is pushed to the remote2
: HEAD is not pushed to the remote1
: An error occurred