Joe Gibbs
Joe Gibbs

Reputation: 164

What is the git equivalent of hg summary?

What is the git equivalent of 'hg summary'? Especially 'hg summary --remote' ??

I've seen translations for 'hg in', 'hg out', and a bunch of other translated commands, but I never see 'summary'. I'm lazy and want to know everything 'hg summary --remote' would tell me in one simple command. Will I have to write a custom script, or will git tell me that?

For reference, here is what the 'hg summary' command does: From https://www.mercurial-scm.org/repo/hg/help/summary

hg summary [--remote]

aliases: sum

summarize working directory state

This generates a brief summary of the working directory state, including parents, branch, commit status, and available updates.

With the --remote option, this will check the default paths for incoming and outgoing changes. This can be time-consuming.

Returns 0 on success.

options:

--remote check for push and pull

also from the quickstart guide

The 'summary' command will summarize the state of the working directory. Command names may be abbreviated, so entering just 'hg sum' is enough:

$ hg sum
parent: 9632:16698d87ad20 tip
 util: use sys.argv[0] if $HG is unset and 'hg' is not in PATH
branch: default
commit: (clean)
update: (current)

Here commit: (clean) means that there no local changes, update: (current) means that the checked out files (in the working directory) are updated to the newest revision in the repository.

Upvotes: 4

Views: 1705

Answers (2)

deluged.oblivion
deluged.oblivion

Reputation: 134

Moving back to git from hg myself, this is what I do.

git show -s

-s hides diff

Upvotes: 5

steve richey
steve richey

Reputation: 505

Try git status. This will display the information I believe you are looking for.

Upvotes: 0

Related Questions