Differences between revisions 1 and 38 (spanning 37 versions)
Revision 1 as of 2005-08-26 00:57:59
Size: 1957
Editor: waste
Comment:
Revision 38 as of 2013-08-26 19:47:38
Size: 249
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== ["Tutorial"] - cloning a repository ==

We have followed TutorialInstall to install ["Mercurial"] already, right? Good!

In ["Mercurial"], we do all of our work inside a ["Repository"]. A ["Repository"] is a directory that contains all of the source files that we want to keep history of, along with complete histories of those source files.

The easiest way to get started with ["Mercurial"] is to use a ["Repository"] that already contains some files and some history.

To do this, we use the ''clone'' command. This makes a ["Clone"] of a ["Repository"]; it makes a complete copy of another ["Repository"] so that we will have our own local, private one to work in.

{{{
 $ hg clone http://www.serpentine.com/hg/hello my-hello
}}}

['''Note''': sorry, but this isn't a real URL yet, because ["Mercurial"] doesn't yet allow you to ["Serve"] multiple repositories using a single daemon. I'm working on a fix.]

[Until this fix is in place, one can use

{{{
 $ hg clone http://selenic.com/hg my-hg-clone
}}}

to try things out whith an already working repository. WARNING, this repository is not the smallest thing out there.]

If all goes well, the ''clone'' command prints no output. We should now find a directory called ''my-hello'' in our current directory:

{{{
 $ ls
 my-hello
}}}

Inside the ''my-hello'' directory, we'll find some files:

{{{
 $ ls my-hello
 hello.c Makefile
}}}

These files are exact copies of the files in the ["Repository"] we just ["Clone"]d.

'''Note''': in ["Mercurial"], each ["Repository"] is self-contained. When you ["Clone"] a ["Repository"], the new ["Repository"] becomes an exact copy of the existing one at the time of the ["Clone"], but subsequent changes in either one /will not show up/ in the other unless you explicitly transfer them.

At this point, we can start examining some of the history of our new ["Repository"], by continuing to TutorialHistory.
Santa Rosa-born Lashawna Cooper is addicted to [[http://wisatatravel.com/2013/08/find-out-what-you-need-to-know-about-travel/|Spain weather today,]] gadgets, rocking aids babies. Finally she's captivated by spending time with her superior friends.

Santa Rosa-born Lashawna Cooper is addicted to Spain weather today, gadgets, rocking aids babies. Finally she's captivated by spending time with her superior friends.

TutorialClone (last edited 2015-10-28 15:22:27 by alishamsulqamar)