# \[RFC\] git subcommand to check if branch is up-to-date with upstream

- From: Sidhant Sharma \<hidden\>
- Date: 2016-07-25 12:58:47 
- List: git
- Page: https://ratatoskr.run/git/2016/07/7686285
- Thread: https://ratatoskr.run/git/2016/07/7686285/t.md

```text
Hi,
I was wondering if it would be a good idea to have a command to check if a
push or pull is required. Perhaps it can also suggest if changes are
fast-forward or the branches (local and remote) have diverged.
The reason I feel the need of such a command is when I need to check if my
branch is up-to-date with the remote, and when I need to know if my local
has diverged. Currently I use a script based on this stackoverflow answer[1]
Not an extremely useful tool, but I thought it'll be good to have it.

Warm regards,
Sidhant Sharma


[1] http://stackoverflow.com/a/3278427/5211579
```
