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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:24:03+00:00 2026-05-13T11:24:03+00:00

I just made the move to version control the other day, and after a

  • 0

I just made the move to version control the other day, and after a bad experience with Subversion, I switched to Mercurial, and so far am happy with it.

Although I understand and appreciate the idea of version control, I don’t really have any practical experience with it.

Right now, I am using it for a couple websites I am working on, and a couple questions have come to mind:

  • When/how often should I commit? After any major change, whether it works or not? When I’m done for the night? Only when it reaches it’s next stable iteration? After any bugfixes?
  • Would I branch off when I wanted to, say, change the layout of a menu, then merge back in?
  • Should I branch? What is the difference (for just me, a lone developer) between branching, then merging back in, and cloning the repository and pulling it back in?

Any other advice for a version control newbie?


So far, everyone has given me good advice, but very team-oriented. I would like to clarify:

At the moment, I am just using VC on some websites I do on the side. Not quite full-out freelance work, but for the purposes of VC, I am the only one that really touches the website code.

Also, since I am using PHP on the sites, there is no compiling to be done.

Does this change your answers significantly?

  • 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-13T11:24:04+00:00Added an answer on May 13, 2026 at 11:24 am

    Most of the questions you’re asking about depends mostly on who you are working with. If you’re a lone developer it shouldn’t matter a lot, since you can do whatever you’d like. But if you’re in a team where you have to share your code then you should discuss with your team members what the code of conduct should be since sharing changes between one another can become tricky at times.

    The discussion regarding code of conduct doesn’t need to be lengthy, it can be very brief; as long everyone is on the same page on how to use the repository that is shared between the programmers in the team. If you want to use the more advanced features in Mercurial, such as cherry picking or patch queues, then try using them so that it won’t impact your team members in a negative way, such as rebasing on a public repository.

    Remember version control has to be easy to use for everyone in the team, or else it won’t be used.

    When/how often should I commit? After any major change, whether it works or not? When I’m done for the night? Only when it reaches it’s next stable iteration? After any bugfixes?

    While working with a team there are several approaches, but the common rule is to commit early and often. The main reason on why you should commit often is to make merge conflicts easier to handle.

    A merge conflict is simply put whenever merging a file that has been changed by at least two people doesn’t work because they’ve been editing on the same lines. If you’re holding on to a commit that involves a very large change with several lines of changes across several files, it will become very difficult to manage for the receiver to manage the conflicts that may occur. The merge conflict becomes even more difficult to handle if the said set of changes are held on for too long.

    There are some exceptions to the rule of committing often and one is whenever you have a breaking change. although if you have the ability to commit locally (which you are doing in Mercurial and git inherently) you could commit breaking changes. As long as you fix whatever broke, you should push it upstream to the shared repository when you’ve fixed your own breaking change.

    Would I branch off when I wanted to, say, change the layout of a menu, then merge back in?
    Should I branch?

    There are many branching strategies to choose from (there is the Streamed Lines paper from 1998 that has an exhaustive pattern list of branching strategies) and when you’re making them for yourself it should be open game for yourself. However when working in teams, you’d better discuss openly with the team if you need to branch or not. Whenever you have the urge to branch though you should ask yourself the following questions:

    • Will my future changes be breaking the work of others?

    • Will my team have a direct negative impact from the changes I’ll be doing until I’m done?

    • Is my code throwaway code?

    If the answer is yes in any of the questions above you should probably branch publically, or keep it for yourself (since you can do that in Mercurial in several ways). You should first discuss with your team on how to execute the whole endavour to see if there is any other way of doing it and if you’re going to merge your changes back in, sometimes there are factors at play where there is no need to branch (this is mostly related to how modular the code is).

    When you decide to branch be prepared to handle a merge conflict. It is sane to assume the one who created the branch and made the commits to be able to merge it back into the “main branch”. At these times it would be great if everyone in the team made relevant commit comments.

    As a side note: You do write good commit comments, right? RIGHT!? A good commit comment usually tells why that particular change was made or what feature the committer was working on instead of a nondescript “I made a commit” kind of comment. This makes it easier for the one who is handling the big merge conflict to figure out what line changes can be overwritten and which ones to keep while going through the revision history.

    Compile times, or build times rather, sometimes play into the branch discussion you may have. If your project has a slow build time then it might be a good idea to use a staging strategy in your branches. This strategy takes into account that all developers should integrate to a “main line” and changes that are approved are elevated (or “promoted”) to the next stage, such as testing or release lines. It is classically illustrated with tag names for open source software like this:

    main -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-> ...
             \           \              \
    test      o-----------o--------------o---------> ...
               1.0 RC1     \ 1.0 RC2      2.0 RC1
    release                 o----------------------> ...
                              1.0
    

    The point with this is that testers can work without being interrupted by the programmers and that there is a known baseline for those who are in release management. In distributed version control, the different lines could be cloned repositories and it may look a bit different since repositories share the versioning graph. The principle however is the same.

    Regarding web development, there are virtually no build times. But branching in stages (or by tagging your release revisions) it becomes easier to roll-back if you want to check a difficult-to-track-down bug.

    However, a whole other thing comes into play and that is the time it takes to deploy the site. Version control tools in my experience are really bad at asset management. Handling art assets that are in total up to several GB usually is a huge pain in the butt to handle in Subversion (more so in Mercurial). Assets may require you to handle them in another way that is less time consuming, such as putting them in a shared space that are synched and backed up in a traditional manner (art assets are usually not worked on concurrently as with source code files).

    What is the difference (for just me, a lone developer) between branching, then merging back in, and cloning the repository and pulling it back in?

    The concepts of branching and keeping remote repositories are closer now than with centralized version control tools. You could almost consider them being the same thing. In Mercurial (and in git) you can “branch” either by:

    • Cloning a repository

    • Creating a named branch

    Creating a named branch means that you’re making a new path in the versioning graph for the repository you’re creating it on. Creating a cloned repository means you’re copying the source repository into a new location, and making a new path in the cloned repository’s versioning graph. They are both two different implementations of branching as a general concept in version control.

    In practice, the only difference between both methods that you should care about is in usage. You clone a repository to have a copy of the source code and have a place to store your own changes in and you create named branches whenever you want to do small experiments for yourself.

    Since browsing through branches is a bit quirky for those who accustomed to a straight line of commits, advanced users know how to manipulate their versions so the version history is “clean” with e.g. cherry picking or rebase. At the moment git docs actually explain rebase rather well.

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

Sidebar

Related Questions

I have a package that I just made and I have an old-mode that
We've got a fairly large amount of code that just made the jump to
I just wonder if anyone knows or made a wrapper around Active Directory to
I just got handed an SDK made of C++ dll, lib, exe, and various
I made a discovery some time back. Just follow these steps: Create a .doc/.xls/.ppt
I have just ported several of our home-made Outlook COM-addins from Delphi 2007 to
I made a test file, and ran through the excel file just fine, but
I have made a new windows service which works fine using barebone code (just
I just saw a comment of suggesting J# , and it made me wonder...
I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World

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.