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 4096810
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:05:39+00:00 2026-05-20T20:05:39+00:00

I have a local repository and I want to get the latest changes from

  • 0

I have a local repository and I want to get the latest changes from a remote repository. I know i can clone but clone only works on new directories. I know i can delete the local repository and then clone but i want to know how do it the Mercurial way if there is one.

EDIT: hg pull -u doesn’t work if there are conflicts. I don’t want to resolve conflicts I just want to get a fresh copy of the remote repo regardless of local changes.

ANSWER: Short answer: Maybe it can be done (see answer below) but re-clone is easier.

Long answer: if you want to get the latest from a remote and disregard your local changes and commits then you’ll have to clone to a new local repository or remove the local repository and clone another one. This is because if you have conflicting changes then hg will force you to resolve them manually.

Which is OK but I just wanted to know if it can be done without removing my local repo.

  • 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-20T20:05:39+00:00Added an answer on May 20, 2026 at 8:05 pm

    Looks like you are looking for hg strip, which isn’t part of the Mercurial core. It’s available through the MqExtension. You can enable it by adding the following in your .hgrc or Mercurial.ini file (https://www.mercurial-scm.org/wiki/MqExtension)

    [extensions]
    mq =
    

    Then you will be able to:

    hg strip rev
    

    This will remove your changesets to the point where you shouldn’t have any merge conflicts. This will impact the branch history though. But then again, that’s not so bad, if you keep them any good future changeset will have an ancestor that you decided to trash.

    If you are just trying something out, you’re better of doing it in a separate branch which is easy to close and abandon later.

    If you really are looking to keep the bad changeset you can pass in configuration option to the merge command like this

    hg --config ui.merge=internal:other merge 
    

    This is documented in Mercurial tips and tricks.

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

Sidebar

Related Questions

I have a local repository. I created the whole application, but now I want
I have a local repository cloned from a bare remote repository. The following command
I have a local git repository, but things get wrong and complicated and I
I have a Git repository on a remote server, but how do I get
Totally new to Capistrano. I have a local git repository that I want to
I have a local repository I'm working on and its remote is hosted on
I have repository on GitHub to which I commit regularly from my local computer.
I have checked out files from my svn repository to a local project folder.
I have local data in a grid. How can I get all of the
I've checked in some changes to my local repository that I want to push,

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.