TODO: Write a tool that checks if the local repo is synced with remote repos:
  1. find qualified remotes
    1. git a list of all remotes: git remote -v
    2. only include remotes that can be read without the user entering a password. That is, they are any one of these:
      • the remote is on the local filesystem
      • two different URLs are specified, one for push and one for pull
      • the remote is a SSH URL, there is an SSH key configured, and:
        • that SSH key requires no password, OR:
        • ssh-agent is running, and has that key added

        How in the world do we auto-detect all those? Specify a $GIT_ASKPASS or $SSH_ASKPASS to our own script, and fail if that script is ever invoked?

  2. find qualified remote-tracked branches
  3. for each remote, for each remote-tracked branch, get the latest version from the far side (do NOT use the locally-cached version), and see if it matches the latest version on our side
  4. confirm there are no local changes that need to be committed
  5. confirm the stash is empty
It should have an option that, when specifies, runs in a mostly-silent non-interactive mode, and simply returns a return-value to indicate if things are matched up or not.

If that option isn't specified, it might be legitimate to ask the user for a password, to




If this turns out to be a solid and generally useful tool, I might want to work to get it integrated into the Git mainline. I really think it should be standard-operating-procedure, basically a more complete 'git status'.



Also, does a tool like this exist already?

existing tools that can do something like this