Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the git equivalent of hg summary?

Tags:

git

mercurial

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.

like image 675
Joe Gibbs Avatar asked Oct 14 '25 20:10

Joe Gibbs


1 Answers

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

git show -s

-s hides diff

like image 99
deluged.oblivion Avatar answered Oct 17 '25 11:10

deluged.oblivion



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!