In porcelain command, a:
$ git diff HEAD
gives you the changes since the last commit (what you would be committing if you run "git commit -a").
A possible equivalent in plumbing command would be:
$ git ls-files -m
for listing all modified (working directory or index) files
If you create your repository by cloning someone else's repository, the remote "master" branch is copied to a local branch named "origin". You get your own "master" branch which is not tied to the remote repository.
There is always a current head, known as HEAD. (This is actually a symbolic link, .git/HEAD, to a file like refs/heads/master.)
run "git status" and analyze the output:
# On branch master
# Your branch is ahead of 'origin/master' by 11 commits.
#
More details in the SO question "Why is Git telling me “Your branch is ahead of ‘origin/master’ by 11 commits.” and how do I get it to stop?"
Possible equivalent in plumbing command:
* git-for-each-ref
for listing all commits, but requires analyzing the output as well...
Again, git ls-files could be used to produced the same result than a git status.
git ls-files --exclude-per-directory=.gitignore --exclude-from=.git/info/exclude \
--others \
--modified \
-t