Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 374911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:27:05+00:00 2026-05-12T14:27:05+00:00

I’ve been using Mercurial but would like to do a quick demo of Git.

  • 0

I’ve been using Mercurial but would like to do a quick demo of Git.

What are the Git equivalents of:

hg init . # start a project in the current directory
hg addremove # look for any added or deleted files
hg commit -m "comment" # commit any uncomitted changes
hg status # what have i changed since the last commit?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:27:05+00:00Added an answer on May 12, 2026 at 2:27 pm

    The Git-HG rosetta stone is not bad

    There are a few other gotchas between the two not mentioned there. This list was cribbed from my own blog post when I went the other way (git -> hg).

    Hg .hgignore, syntax: glob is the same behaviour as git’s .gitignore.

    Git .git/config, ~/.gitconfig, use git-config to modify the values
    Hg .hg/hgrc, ~/.hgrc, use hg help -c config

    Git git commit -v<br>
    Hg hg diff | less; hg commit

    Git gitk<br>
    Hg hg view, or thg from [TortoiseHg][1]

    Git git gui<br>
    Hg Mercurial doesn’t ship GUI to select changesets, only console hg record command.

    Git git rebase<br>
    Hg hg rebase. For git rebase --interactive there’s hg histedit, or Mercurial Queues

    Git git push URL ; git remote add origin URL<br>
    Hg hg push URL; $EDITOR .hg/hgrc ; [paths] default = URL

    Git gitk, git log origin/master..HEAD<br>
    Hg hg outgoing

    Git git format-patch RANGE<br>
    Hg hg email -m filename -o

    Git git add . ; Note the dot
    Hg hg add ; No dot needed.

    Git git checkout REVISION-KEY<br>
    Hg hg update CHANGESET

    Just to fill the blanks, some of the most useful commands from Mercurial:

    Hg hg record
    Git git add -p; git commit

    Hg hg inc [URL]
    Git No real equivalent. You can only do equivalent of hg pull; hg log -r .:

    Hg hg out URL
    Git Please add if you know how.

    For merge conflict resolution, the hg resolve command in Mercurial has a few options that change the behaviour:

    Hg hg resolve -m FILE (marks the file as having been resolved by manually fixing up the conflict problem)
    Git git add FILE

    Hg hg resolve -u FILE marks the file as having been unresolved
    Git git reset HEAD FILE to unstage the file

    Hg hg resolve -l (lists files with resolved/unresolved conflicts)
    Git git status – files that merged cleanly are added to the index automatically, those that are not have conflicts

    Hg hg resolve FILE (after a merge, attempts to re-merge the file)
    Git no equivalent for re-merging that I know of.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
Specifically, suppose I start with the string string =hello \'i am \' me And
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.