comparison text/quick_start.txt @ 114:aa325d9f79cd

Reqorked quick start text.
author Arne Babenhauserheide <bab@draketo.de>
date Fri, 24 Apr 2009 10:30:00 +0200
parents 7a057bf137c5
children 17a30a75abaf
comparison
equal deleted inserted replaced
113:54e0024cbf09 114:aa325d9f79cd
1 = Quick Start = 1 = Quick Start =
2 2
3 When you've been using Mercurial for some time, many things become 3 This site should get you going in an instant.
4 second nature, so it's sometimes hard to remember that its basic concepts are
5 quite revolutionary compared to Subversion.
6 4
7 Please don't let that intimidate you. Mercurial is damn powerful, even if you 5 Aside from the practical Quick Start to the right, there are only a few commands you need to start working.
8 just use the basics (init, commit, log, pull, push, serve, merge). And the
9 basics are very easy to use, once you see the model behind that: Each
10 repository has the whole history, and history is not necessarily linear.
11 6
12 Just stick to these and learn the rest of its commands as you need them. 7 Even if you stick to these basics, Mercurial is quite powerful. And they are very easy to use, once you see the model behind that: Each repository has the whole history, and history is not necessarily linear.
13 8
14 As a short intro: 9 A quick overview of the basic commands:
15 10
16 - init: create a new repository 11 - hg init: create a new repository
17 - commit: save your changes in the current repository 12 - hg commit: save your changes in the current repository
18 - log: see all changes in your repository 13 - hg log: see all changes in your repository
19 - pull: get all changes from another repository int the current one 14 - hg pull: get all changes from another repository int the current one
20 - push: get all changes from your repository into another one 15 - hg push: get all changes from your repository into another one
21 - serve: create an instant-webserver. People can see the history there and 16 - hg serve: create an instant-webserver. People can see the history there and pull from it
22 pull from it 17 - hg merge: join different lines of history
23 - merge: join different lines of history
24 18
25 If you want to see a nice graph of the history, just do "hg serve" in your 19 If you want to see a nice graph of the history, just do "hg serve" in your repository and then direct your browser to
26 repository and then direct your browser to
27 20
28 http://127.0.0.1:8000 21 http://127.0.0.1:8000
29 22
30 This also helps getting a feeling for what the commands do. 23 This also helps getting a feeling for what the commands do.
31 24
32 (you can do more finegrained stuff with command options. Just call "hg help 25 (you can also do a lot of finegrained stuff by using different command options. Just call "hg help <command>" to see them).
33 <command>" to see them).
34
35 26
36 I hope your experience with Mercurial will be as great as mine! 27 I hope your experience with Mercurial will be as great as mine!
37 28
38 - Arne Babenhauserheide 29 - Arne Babenhauserheide
39 30
40 = Basic concepts of Mercurial = 31 = Basic concepts of Mercurial for Subversion users =
41 32
42 //If you're interested in the concepts behind Mercurial, please come with us and listen to a great explanation from Martin Geisler: // 33 //If you're interested in the concepts behind Mercurial and already know Subversion, please come with us and listen to a great explanation from Martin Geisler: //
43 34
44 Let me try to make 35 Let me try to make some of the basic concepts clear:
45 some of the basic concepts clear:
46 36
47 * Like in Subversion, history consists of a number of commits. They're 37 * Like in Subversion, history consists of a number of commits. They're
48 called changesets in Mercurial. 38 called changesets in Mercurial.
49 39
50 * Subversion requires a strict linear ordering of the commits and 40 * Subversion requires a strict linear ordering of the commits and
87 The changeset C3' will be the new tip since it is the newest 77 The changeset C3' will be the new tip since it is the newest
88 changeset in the repository. Note that tip is always a head, but a 78 changeset in the repository. Note that tip is always a head, but a
89 head need not be the tip. 79 head need not be the tip.
90 80
91 * Having two heads suggest that someone should merge them -- otherwise 81 * Having two heads suggest that someone should merge them -- otherwise
92 the changes from one will never be combined with the changed made in 82 the changes from one will never be combined with the changes made in
93 the other head. 83 the other head.
94 84
95 When merging with 'hg merge' the task is to figure out the canonical 85 When merging with 'hg merge' the task is to figure out the canonical
96 way to combine the changesets. If the changes do not overlap this is 86 way to combine the changesets. If the changes do not overlap this is
97 usually trivial, otherwise you have to do a three-way merge. The 87 usually trivial, otherwise you have to do a three-way merge. The