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

  • Home
  • SEARCH
  • 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 6974677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:16:08+00:00 2026-05-27T17:16:08+00:00

Is it pull update merge commit push ? Or can you do the commit

  • 0

Is it

  1. pull
  2. update
  3. merge
  4. commit
  5. push

? Or can you do the commit first?

I don’t like the idea of pulling and merging without having a version of my local code backed up somewhere in case the merge explodes, but presumably you have to do the merge before you can do a push, because you can’t have conflicts in the central repo. Not quite understanding this whole process yet; used to my nice simple SVN.

  • 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-27T17:16:09+00:00Added an answer on May 27, 2026 at 5:16 pm

    I recommend to always commit before pulling in changes to your working directory, unless you are 100% sure that your changes and the changes to be merged into your working directory will not conflict.

    If you do an updating pull (hg pull; hg update, or shorter hg -u pull) and have any outstanding non-committed changes, any changes coming from outside will be combined with your changes. When conflicts happen, it might be difficult to decide how the merge result should look like, because you can’t easily distinguish between your changes and the changes merged in.

    When you did commit first, it is much easier to decide how the merge result should look like, because you can always look at both parents of the merge.
    So, in effect it is:

    1. hg commit
    2. hg pull -u (if no merge necessary, go to 5)
    3. hg merge
    4. hg commit
    5. hg push

    Update: As Martin Geisler has pointed out, it is possible to get at the “original” changed version of a file using:

    hg resolve --unmark the-file
    hg resolve --tool internal:local the-file
    

    or for all files at the same time:

    hg resolve --unmark --all
    hg resolve --tool internal:local -all
    

    Still, I find the “commit first” system nicer. At the end, it is personal preference…

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

Sidebar

Related Questions

For larger teams, having to pull/update/merge then commit each time makes no sense to
I can't do use git post-update hook to pull into my website folder, from
The scenario is that I arrive at work one morning and pull, update, merge
I'd like to pull a stream of PCM samples from a Mac's line-in or
I would like to pull artifacts from teamcity. I've been trying to use c#
I want to pull out duplicate records in a MySQL Database. This can be
After my team friend did a push operation on our repo I can't do
I've been wondering if there's an easy way to push and pull a local
I did a merge of 2 files and now Im trying to commit but
I find myself doing the following a lot: C:\Code>hg pull pulling from http://server/FogBugz/kiln/Repo/Project/Rebuild/trunk searching

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.