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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:29:00+00:00 2026-05-13T20:29:00+00:00

I’m pretty new at Mercurial – actually new at source control. I have projects

  • 0

I’m pretty new at Mercurial – actually new at source control.

I have projects at localhost, which is ~/mamp/htdocs. I want to work all local. There is a point I’m confused about:

I should keep repository at a different path than my htdocs I think, so I created “/reps/” folder and creating folders for each project under here, and copy all files from htdocs project folder to reps.

for example; project01

copy files from ~/mamp/htdocs/project01/ to
/reps/project01/

But I work at localhost (htdocs) for changing files, etc. so how do I relate these changes to /reps/?

Obviously I’m missing some very obvious point about Source Control. Did I make a wrong start?

All the tutorials I found online requires some kind of base knowledge, I guess; none of them tells anything from meaning zero point! :/

  • 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-13T20:29:01+00:00Added an answer on May 13, 2026 at 8:29 pm

    The simplest way, if you want to edit your files in ~/mamp/htdocs/project01/ (because I also agree that it would be good to have some kind of staging area where you could test your changes before deploying them to the production server, but maybe it is precisely your machine which is the staging area, so everything’s ok then :-)) is to:

    1. Install Mercurial
    2. cd ~/mamp/htdocs/project01/
    3. hg init
    4. hg add *.html subdir *.css (whatever you want to manage)
    5. hg commit -m"initial version"

    After you have done hg init, there is a repository in a .hg dir under ~/mamp/htdocs/project01/ ! It is not possible to avoid this (yet at least) with hg: if you have sources in project01 you need to have a repo in project01. And it’s sufficient because you can benefit from version control with just that, whenever you change a file, you can commit it and give a log message to tell the system what you have done, e.g.,

    • <edit> a.html
    • hg status (will tell you the currently modified files)
    • hg diff (will tell you the differences with the saved version)
    • hg commit -m"what-has-changed-message" (save a new version)

    Even if it is not necessary to have another repo elsewhere (e.g., in /reps) if you want to, for instance to have your data in a backuped zone, then you could just clone the one in $HOME:

    • cd /reps
    • hg clone /home/name/mamp/htdocs/project01/ project01

    Which will get in /reps/project01 an exact copy of what you have done: all your changes and all your log messages. Now if you do that, whenever you do "hg commit" to save a change in your primary repo, you also need to do "cd /reps/project01" and "hg pull" in order to forward the changes to /reps if you want it to stay synchronized.

    Hope it is simple enough..

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I have a text area in my form which accepts all possible characters from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small

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.